Archived topic
Posts on static front page
3 replies · Started by Christina on February 26, 2019
Hi there,
I have a static front page, and I want to show the 6 most recent posts on that. I am familiar with PHP and I have prepared a hook in my functions.php which print out at the right place. I just need the query which display the posts. I want the HTML-structure to be the same as at the category pages due to my CSS styling. I have tried just to copy the while loop from archive.php but it didn't work. What do I need to change?
Thanks,
Peter
Hi there,
I would recommend using Tom's WP Show Posts:
https://wordpress.org/plugins/wp-show-posts/
It's created specifically for requests like this.
Hope this helps!
Hi Leo
I would prefer not to install another plugin for that. Isn't it possible to achieve without installing a plugin? I just need it one time for the front page.
Regards,
Peter
You will need a custom solution which is out of the scope of this forum.
WP Show Posts is made by Tom (same author of GP) so it should be very light with minimal impact for your site :)