Custom taxonomy query broken after upgrade to 4.4

I wouldn’t recommend using a taxonomy slug that coincides with the public query variables, like title.

The title query variable was introduced in 4.4 so I think that could explain your problems.

Check out this part of the WP_Query class:

    if ( '' !== $q['title'] ) {
        $where .= $wpdb->prepare( 
            " AND $wpdb->posts.post_title = %s", 
            stripslashes( $q['title'] ) 
        );
    }

So when we use for example:

example.tld/?title=test

what should WordPress do here? Is it a taxonomy query or title search?

So I would recommend prefixing the custom taxonomy slug, e.g.

gary_title

to avoid possible name collisions.

Update:

Thanks to @ocean90 for pointing out that this is a bug, that will be fixed in 4.4.1

Leave a Comment