wp query – How to show multiple posts thumbnail, title and date in widget

Question

I`m making a plugin with a widget to show a post that I recommend or mark with a checkbox in the post list.

Question:
I have said in the code that I want to show 2 post per page.
It only show one with thumbnail image and title, and the second one with just a title.
But if I said I want 3 post per page it shows 2 complete with image and title, and the third with only title.
What did I do wrong ?

The files for the plugin is here, if you would take a look.
https://github.com/bjovaar/terplugin

enter image description here

0
bjovaar 9 months 2022-03-06T15:03:41-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse