P.S.
I created function to get primary category:
function func_get_yoast_primary_category( $atts ) {
global $post;
$cat_id = get_post_meta($post->ID, ‘_yoast_wpseo_primary_category’,true);
$term = get_term( $cat_id );
return $term->name;
}
add_shortcode( ‘get_yoast_primary_category’, ‘func_get_yoast_primary_category’ );
And i try to use in logic this:
func_get_yoast_primary_category($term->name) == ‘CATEGORY NAME’
But nothing happen, before i use other plugin and it works, but now