Archived topic
After Header hook problem
4 replies · Started by marcel on September 15, 2016
Hey tom !
I try this and no work..
<?php if ( is_tax("Sauna") ) : ?>
Sauna
<?php endif; ?>
<?php if ( is_tax("Spa") ) : ?>
Spa
<?php endif; ?>
No detect de tax.. , in sauna category page show : Sauna Spa
in piscina category page show : Sauna Spa
Some content..
Thanks
If both are displaying, it means that the conditional returns true for both pages.
Another possible reason is you don't have "Execute PHP" checked.
THANKS TOM. But Execute PHP” checked in both..
When is checked display nothing
If not checked display : Sauna Spa
If nothing is displaying when Execute PHP is checked, it means the conditional is returning false.
You'll need to make sure you're using it correctly and calling the right name: https://codex.wordpress.org/Function_Reference/is_tax