Conditional statement, CPT, single, with tag
-
When writing conditional statement that includes has_tag, do you have to include the custom post type if the taxonomy’s attached to it only? So… if the CPT is x, and has tag Y, and is single, then… OR, just is single and has tag?
if ( !is_single() || has_tag( 'tours') ) return;
Should that return what follows it on single pages with the tag tours? (it’s not, and I tried has_term, too).
- The topic ‘Conditional statement, CPT, single, with tag’ is closed to new replies.