Support » Themes and Templates » Using get_posts for 2 categories

  • I’m trying to extract the posts which belong to 2 categories (an issue and a topic). The post needs to belong to both categories to be displayed.

    I’ve tried

    global $latestissuecat;
    $latestissuecat = 25;

    (to return all posts which are in both categories 25 and 12) but this seems to return all the posts in category 25 regardless of ccategory 12. Is there a way to do this properly or do I have some kind of syntax error in the above code?

  • The topic ‘Using get_posts for 2 categories’ is closed to new replies.