template-parts/entry-header.php
find:
if ( true === $show_categories && has_category() ) {
insert a post ID condition
// Conditional examples
$post_id = '11'; //assign post id you are targeting
$ID = get_the_ID();//assign current post ID
$ID === $post_id; //show only if identical
$ID !== $post_id; //show if not identical
$post_id = array( 11, 12, 13 ); //array of post IDs
in_array( $ID, $post_id ); //show only in array
// Multiple conditional statement
if ( true === $show_categories
&& has_category()
&& $ID !== $post_id ) {
You can include category name/term_id/slug, or an array of them to check for in has_category($args) if you are targeting a specific category.
-
This reply was modified 2 years, 9 months ago by backbone. Reason: typo
-
This reply was modified 2 years, 9 months ago by backbone. Reason: typo