Need some help with conditional logic
-
I’m trying to write conditional statements in the header and I’m all mixed up.
Right now I have:
if(is_page('photographs')) : echo 'this is the photographs page'; endif; if(is_page('journal')) : echo 'this is the journal page'; endif; if(is_page('information')) : echo 'this is the information page'; endif;
That all works great, and I’m certain it’s inefficient. However, when a user isn’t on any of those pages, I need it to echo “home”. HOME actually is appending on the end of all the aforementioned echo’s. So it reads “This is the photographs page home”.
Grace me with your knowledge!
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Need some help with conditional logic’ is closed to new replies.