Display 5 Most Recent Posts on Top of Index.php
-
As the title says, I’m trying to display the 5 most recent posts at the beginning of index.php. The reason for this is I’m trying to implement an image carousel, therefore I only need the 5 most recent posts to be displayed on the front page of my site.
I have tried querying 5 most recent posts, but that seems to display them at the top of EVERY page.
I’m sure there is some sort of option that says if the page is home, then display 5 most recent posts but I can’t quite figure it out. Any help would be greatly appreciated (and no, I prefer not to use the static front page option in WP Admin settings).
Thanks!
- The topic ‘Display 5 Most Recent Posts on Top of Index.php’ is closed to new replies.