else_if not recognizing static home page and blog
-
I’m looking for some advice. I am wanting a different image to show up on each page in the header. I am using the else_if commands and can get the different images showing up for all of my pages except the home page and blog page.
I have the settings pointing to a static home page and have the blog at /blog.
Here’s the code and the url is https://www.dityseo.com:
<div id=”<?php
if(is_page(‘home’)){
echo “pagetitleseo”;}
elseif(is_home()){
echo “pagetitleseo”;}
elseif(is_page(‘website-optimization’)){
echo “pagetitlewebsiteoptimization”;}
elseif(is_page(‘start-a-blog’)){
echo “pagetitlestartablog”;}
elseif(is_page(‘search-engine-optimization’)){
echo “pagetitleseo”;}
elseif(is_page(‘pricing’)){
echo “pagetitlepricing”;}
elseif(is_page(‘contact-us’)){
echo “pagetitlecontact”;}
elseif(is_page(‘blog’)){
echo “pagetitleblog”;}
?>”></div>
- The topic ‘else_if not recognizing static home page and blog’ is closed to new replies.