has_tag with array conditional tag PHP question please
-
I’m trying to condition some ads based upon tags. I do it in several functions, so I want to define the array of tags I’m referencing just once.
So I am doing this first:
$noadtags = array('tag1','tag2','tag3');And the I have an IF statement that checks it. However, it is not working. Can someone see what is wrong with my PHP?
if (!has_tag(array($noadtags))) {I’ve also tried it like this:
if (!has_tag(array('$noadtags'))) {and like this:
if (!has_tag(($noadtags))) {and this:
if (!has_tag(('$noadtags'))) {
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘has_tag with array conditional tag PHP question please’ is closed to new replies.