Support » Plugin: CPT-onomies: Using Custom Post Types as Taxonomies » mashup with tax_query not working on 1.3.1

  • Resolved subigya

    (@subigya)


    Hi πŸ™‚ I just encountered a very interesting problem. The following code works fine upto 1.3, but it doesn’t work on 1.3.1.

    $args1 = array (
          'post_type' => 'faculty',
          'posts_per_page'=> -1,
          'tax_query' => array(
            array(
              'taxonomy' => 'divisions', // This is the CPTnomies related taxonomy
              'field'    => 'term_id',
              'terms'    => $term->term_id
            )),
         'faculty_type'	=> 'division-director' // This is a custom taxonomy for custom post type faculty
     );

    This code works perfectly fine upto 1.3. On 1.3.1, i couldn’t get this to work, even after having both taxonomies with a ‘relation’ => ‘AND’ query between the two tax queries.

    Somehow on 1.3.1, i can’t seem to create a relation between custom taxonomy and a cptonomies taxonomy!

    Thank you.

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

Viewing 4 replies - 1 through 4 (of 4 total)
  • I think I know what the problem is. And it’s my fault. I’m sorry. I had a feeling about this code and here’s why.

    For the time being, make the following fix and I’ll get it sorted ASAP.

    Go into manager.php file and change line 323-324 to:

    $is_registered_cpt_onomy = $this->is_registered_cpt_onomy( $taxonomy );

    Please let me know if that fixed it so I’ll know what to do on my end.

    Thanks!

    Thread Starter subigya

    (@subigya)

    That fixed it! Thank you.

    //if ( ! ( $is_registered_cpt_onomy = $this->is_registered_cpt_onomy( $taxonomy ) ) )
    //	continue;
    $is_registered_cpt_onomy = $this->is_registered_cpt_onomy( $taxonomy );

    Same problem for me, same fix working !
    Thanks Rachel

    Thanks, this one killed a couple hours for me until I finally found this. Might be good to include this in the docs on your site.

    will this be included in the next plugin update, please?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘mashup with tax_query not working on 1.3.1’ is closed to new replies.