Cant’ Display Custom Post Type Title Base on Tax Terms

  1. The {tax} => {term} pattern is deprecated as of 3.1 you should be using tax_query, but your code should still work for some undetermined length of time.

  2. post_child is not a parameter that WP_Query accepts. I don’t know what you expect that to do but at best it does nothing. This may be breaking you query, but I doubt it. I would expect it to be simply ignored.

What you should be using is this, pretty much straight from the Codex:

$args = array(
    'post_type' => 'photos',
    'tax_query' => array(
        array(
            'taxonomy' => 'technique',
            'field' => 'slug',
            'terms' => 'zevar'
        )
    ),
    'posts_per_page' => 10 
);
$loop = new WP_Query( $args );

That code, plus a readable while loop…

while ( $loop->have_posts() ) {
    $loop->the_post();
    the_title();
}

… does work. I tested it. Of course, you have to have the taxonomy setup correctly and you have to have posts in the post type with the right term.