WordPress.org

Forums

wp_query for same custom taxonomies (1 post)

  1. Ale Urrutia
    Member
    Posted 3 years ago #

    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; ?>

    Any idea?,
    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic