• I’m trying to figure out how to display all posts by Taxonomy. The Taxonomy is named “league” i have two values at the moment, NFL & MLB. How would i display posts only that have the value of NFL?

    I’ve been messing with this all day and its driving me insane so if anyone can help I would appreciate it!

    Thanks!

Viewing 1 replies (of 1 total)
  • This should do it.

    $args = array(‘post_type’ => ‘yourposttype’, ‘league’ => ‘NFL’, ‘order’ => ‘ASC’);

    $loop = new WP_Query( $args );

    while ( $loop->have_posts() ) : $loop->the_post(); ?>

    <?php the_content(); ?>

    <?php endwhile; ?>

Viewing 1 replies (of 1 total)
  • The topic ‘Display posts by Taxonomy’ is closed to new replies.