<?php | |
query_posts( array( 'post_type' => 'custom', 'taxonomy-slug' => 'term-slug' ) ); | |
if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> | |
<h3><?php the_title(); ?></h3> | |
<?php the_content(); ?> | |
<?php endwhile; endif; wp_reset_query(); ?> | |
<?php wp_reset_postdata(); ?> |
How to query for a single term in a custom post type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Have Questions? I can help! Get Started
Leave a Reply