Conditional tags not working
-
Hi.
I have had success using conditional statements in previous websites, but I seem to be stuck.I have an item in my footer that I would like to only show on the home page. Traditionally, I would use such a code to accomplish this:
<?php if (is_home()) { ?>
**the item I want to show***
<?php } ?>In troubleshooting this, I have determined that no conditional statements will work on my website if placed in the footer section. Additionally, I have discovered that while conditional statements will work if placed in my sidebar, they won’t work if I use “is_home” or “is_front_page”. I don’t get an error, just nothing shows up.
Using statements such as “is_category” work just fine if in my sidebar, but not in my footer.
That is probably two different issues, but in either case I’m stumped by the occurance.
What could be preventing such code from working?
Thanks in advance for any help.
~Christian
- The topic ‘Conditional tags not working’ is closed to new replies.