Forums

wp_query for same custom taxonomies (1 post)

  1. Alejandro Urrutia
    Member
    Posted 10 months 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!

Reply

You must log in to post.

About this Topic

  • RSS feed for this topic
  • Started 10 months ago by Alejandro Urrutia
  • This topic is not resolved
  • WordPress version: 3.2.1