I created a custom post called projects and a taxonomy called tagportfolio , in the admin panel i created 3 tags under this taxonomy to filter my projects

portfolio page

the three tags is

  1. Urban planning and upgrading
  2. Urban Design and Landscape
  3. Architecture and Interior Design

under each tag there is a posts , now i need to know how i can display the posts that under each tag for example: posts under tag Architecture and Interior Design in a page template


N.B this is the custom post and taxonomy functions git://gist.github.com/3066834.git gist-3066834

this is how the child tax should be displayed {like the main tax} git://gist.github.com/3061479.git gist-3061479

  • Please add the code you used to create both (taxonomy and custom post type) to your question.
    – fuxia
    Jul 7, 2012 at 0:28
  • @ Toscho , i added in the question now Jul 7, 2012 at 15:17

1 Answer 1


You're looking for WP_Query

echo '<ul>';

//The Arguments
$args = array(
    'post_type' => 'project',
    'tagportfolio' => 'urban-design-and-landscape' //should use the slug name not the full name

// The Query
$the_query = new WP_Query( $args );

// The Loop
while ( $the_query->have_posts() ) : $the_query->the_post();
    echo '<li>';
    echo '</li>';

echo '</ul>';
  • not working thiago , i tried it :( Jul 7, 2012 at 17:51
  • there was an spell error on my post_type argument. I have looked into your code and youre already using WP_Query, so you should do in the same way but adding your tagportifolio filter. codex.wordpress.org/Class_Reference/… Jul 10, 2012 at 11:26
  • Also, if you havent yet, consider looking into Child Themes topic, especially using thematic. Jul 10, 2012 at 11:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.