wp_query for same custom taxonomies
Hi, on my “Work” template used for the custom post type with the same name, I have the following code showing a list of titles for every “work”. What I want to do is to display just on that list the “Works” that have the same Custom taxonomy than the current one.
<?php $loop = new WP_Query( array( 'post_type' => 'work', 'posts_per_page' => 10, 'orderby' => asc ); while ( $loop->have_posts() ) : $loop->the_post(); ?> <li> <?php the_title; ?> </li> <?php endwhile; ?>
- The topic ‘wp_query for same custom taxonomies’ is closed to new replies.