• First off, my question is pertaining to index.php and has nothing to do with the main loop (as far as I can tell.) I’m not an expert about the processes needed to achieve this, so bear with me.

    What I want to do is display recent posts from a given category outside of the main loop, on the index page. Specifically, I want to generate a random number when the page loads, then use that to determine which category’s posts are displayed. For example, if 1 is generated, display the 3 most recent posts from category 1, independent of the standard loop.

    I’m ok with WordPress and php, but by no means an expert with all the tags, intricacies, etc., so any help would be appreciated.

The topic ‘Display only posts from certain category on index’ is closed to new replies.