Forums

2 post queries based on category and tags (2 posts)

  1. RaGoe
    Member
    Posted 3 years ago #

    Hello,
    I'm trying to generate 2 seperate post listings on a page using RunPHP plugin on a WP site.

    The posts are supposed to come out of 2 different categories and the posts are tagged with a specified tag:

    <?php query_posts('cat=7&tag=2007+2008'); ?>
    When I add another query <?php query_posts('cat=11&tag=2007+2008');
    later on the page, It doesn't seem to work, the posts of the second query do not get listed.

    Any help on how to get this done is highly appreciated.

    Kind regards,
    RaGoe

  2. Austin Matzko
    Member
    Posted 3 years ago #

    I apologize if you already know this, but query_posts just sets things up for the "Loop," which must come after it for the posts to show. So if there is no "Loop" after the second query, that would explain why its posts do not show up.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.