Ready to get started?Download WordPress


CPT-onomies: Using Custom Post Types as Taxonomies
[resolved] mashup with tax_query not working on 1.3.1 (4 posts)

  1. subigya
    Posted 9 months ago #

    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(
              '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.


  2. Rachel Carden
    Plugin Author

    Posted 9 months ago #

    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.


  3. subigya
    Posted 9 months ago #

    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 );
  4. JudeAAZ
    Posted 7 months ago #

    Same problem for me, same fix working !
    Thanks Rachel


You must log in to post.

About this Plugin

About this Topic