WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
Please add the code you used to create both (taxonomy and custom post type) to your question. – toscho Jul 7 '12 at 0:28
@ Toscho , i added in the question now – Rasha Nour Eldin Jul 7 '12 at 15:17
up vote 0 down vote accepted

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>';
share|improve this answer
not working thiago , i tried it :( – Rasha Nour Eldin Jul 7 '12 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/… – Thiago F Macedo Jul 10 '12 at 11:26
Also, if you havent yet, consider looking into Child Themes topic, especially using thematic. – Thiago F Macedo Jul 10 '12 at 11:28

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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