Display custom post type by custom taxonomy?
-
I have a custom post type called layouts which has a hierarchical taxonomy called creator. I want to create a page template and an archive template that shows only layouts that have a certain creator and not to show any others.
So far I have…
<?php $loop = new WP_Query( array( 'post_type' => 'layouts', 'showposts' => 24 ) ); ?> <?php while ( have_posts() ) : the_post(); ?> <a class="hover-image" href="<?php the_permalink() ?>#thumb"><?php the_post_thumbnail('thumbnail'); ?><span><?php the_post_thumbnail('large'); ?><br /><?php the_title(); ?></span></a> <?php endwhile; ?>
I am not show how to limit posts to just one creator. I have tried has_term but that didn’t work but I guess it only works on category templates?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Display custom post type by custom taxonomy?’ is closed to new replies.