WordPress.org

Support

Support » Alpha/Beta » filter via post_type tax term slug not working in 3.0?

filter via post_type tax term slug not working in 3.0?

  • Here is a simple query that does not seem to work. For some reason the results are not filtering via the post_type. Results are turned for all post types that contain the taxonomy ‘series’ with the slug.

    <?php
    $wpq = array (post_type =>'sermons','taxonomy'=>'series','term'=>$term->slug);
    $query = new WP_Query ($wpq);
    while ( have_posts()) : the_post(); ?>
    
    <?php the_title(); ?>
    do other stuff
    
    <?php endwhile; ?>

    Because I have multiple post types that use the taxonomy series, that also would have the same term applied, I am getting the output of both types, not just sermons.

    Is this a bug with 3.0, or a code error on my part?

    You can see the results at:
    http://deardaddy.org/series/unidos-messages/

    Basically I am simply calling 2 loops with the above logic. The first query uses ‘sermons’ as post_type, the second uses ‘podcasts’ as post_type.

    However, both sermons and podcasts are being displayed in both queries.

    Should my function above not filter via the post type?

Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘filter via post_type tax term slug not working in 3.0?’ is closed to new replies.
Skip to toolbar