In the article page (single.php) of my theme I have the following code that filters a div making it appear only on pages of a certain category:
<?php $categoria_post = the_category_id($categoria_post);
if ($categoria_post == 760) : ?>
<div>
...
</div>
<?php endif; ?>
I need to filter a div in a similar way, however from the slug of a taxonomy (series_exp), ignoring the id.
Something similar, but filtered only by the slug:
EDITED
Form this custom taxonomy was created:
add_action( 'init', 'create_post_tax' );
function create_post_tax() {
register_taxonomy(
'series_especiais',
'post',
array(
'label' => __( 'Séries Especiais' ),
'rewrite' => array( 'slug' => 'series_especiais','with_front' => true ),
'hierarchical' => true,
)
);
}