WordPress.org

Ready to get started?Download WordPress

Forums

CPT-onomies: Using Custom Post Types as Taxonomies
Two diferents db request to same query (3 posts)

  1. jrgodoi
    Member
    Posted 1 year ago #

    I have one query to request a list of posts but WordPress make diferents databases requests for diferents custom taxonomy.

    The query is simple:

    $new_query = new WP_Query( array ('post_type'=>'linha', 'posts_per_page'=>-1, 'colecao'=>$colecao, 'orderby'=>'title', 'order'=>'ASC', 'paged' => get_query_var('paged')) );

    With $colecao = monoporosa http://pastebin.com/cXsK1QbD

    With $colecao = naturale http://pastebin.com/XdehM9sw

    "colecao" and "linha" are cpt-onomies.

    http://wordpress.org/extend/plugins/cpt-onomies/

  2. Rachel Carden
    Member
    Plugin Author

    Posted 1 year ago #

    I don't understand. Is the query not working?

  3. jrgodoi
    Member
    Posted 1 year ago #

    Hi Rachel,

    First of all, thanks for the awesome plugin :)

    The query only works for "$colecao='naturale'", what I find strange is the fact of the same WP_Query generate different database requests (as you can see in pastebin).

    There's a lot of INNER JOIN in the query that doesn't work: http://pastebin.com/cXsK1QbD

    Am I doing something wrong?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic