RESOLVED Taxonomy logic not working in versions higher than 2.2.7

vin

New member
Messages
3
Likes
0
Points
1
#1
Just found out that my Woody snippets that use taxonomy logic ("Taxonomy Equals MyCategoryName") are not showing. Did a rollback to version 2.2.7 and it's working fine again.
 

Temyk

Developer & Support
Messages
1,129
Likes
42
Points
48
#2
Hello.

The logic of taxonomies has changed slightly. This parameter specifies the taxonomy page, and not the post with the selected taxonomy.
 

vin

New member
Messages
3
Likes
0
Points
1
#3
Hi Temyk,

thanks, I didn't pick up on that. So how can I target posts with the selected taxonomy now?
 

Temyk

Developer & Support
Messages
1,129
Likes
42
Points
48
#4
We will return this feature in future updates.
In the meantime you can check the snippet code yourself:
PHP:
global $post;
$post_cat = get_the_category( $post->ID );
$needle_cat = get_the_category( '1' ); //Taxonomy ID
if ( isset( $post_cat[0] ) && isset( $needle_cat[0] ) ) {
    if($post_cat[0]->term_id === $needle_cat[0]->term_id)
    {
        //you code
    }
}
 

Temyk

Developer & Support
Messages
1,129
Likes
42
Points
48
#5
This is fixed in update 2.3.2