WordPress.org

Ready to get started?Download WordPress

Forums

Multiple Tags in PHP Query (2 posts)

  1. vezhead
    Member
    Posted 5 years ago #

    <?php $recent = new WP_Query("tag=Tag1&showposts=25");

    I'm just a hack when it comes to code. If I want to display posts that have tag1 AND tag2 (not OR), how would that work?

  2. Evita
    Member
    Posted 5 years ago #

    From the codex:
    query_posts('tag=bread+baking+recipe');

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags