is_tag array && !is_single can't get it to work…
-
So i’m trying to print
<?php if (!is_tag(array('1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22') && !is_single() && !is_category())) { ?> this is a test <?php single_tag_title(); ?> test test <?php } elseif (is_single()) { ?>this should only print on single page <?php echo get_the_title(); } ?>
So what i’m trying to do with the code above is to print the “this is a test <?php single_tag_title(); ?> test test” message on a page that isn’t a single page, isn’t a category page, and isn’t a tag page that’s within the numbers stated in the array.
And i want the second message this should only print on single page <?php echo get_the_title(); } ?> to print on all single pages, this will not work, the first statement of the code renders on single pages, and category pages even though i’ve included !is_category and !is_single, what am i doing wrong?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘is_tag array && !is_single can't get it to work…’ is closed to new replies.