• I’m attempting to retrieve posts only from a specific category via a get_posts() call, but I am retrieving posts from other categories from this call. I’ve got the call as follows:

    $lastposts = get_posts('category=general');

    How do I format the call so as to retrieve only the posts from the given category – and to retrieve no posts at all if there are no posts in that category?

The topic ‘Retrieving category specific posts’ is closed to new replies.