• Hello – I recently customized a WordPress site here:

    https://www.innerloopluxury.com

    I have edited a few WordPress templates and designed several other websites, but am stuck on a couple of issues and I am hoping that someone here can help me. I have a feeling it’s a piece of PHP that I am missing – because most of it is working. I followed the conditional tags method which I found on this support forum. And as I mention – mostly – it works. However – on one page (lifestyle) it’s not working.

    Here is my code:

    <?php
    if(is_page('walkable-wonderland')){
    echo '<img src="https://www.innerloopluxury.com/wp-content/themes/dodo/images/header_bm.jpg" />';
    }
    if(is_page('home')){
    echo '<img src="https://www.innerloopluxury.com/wp-content/themes/dodo/images/header_bg.jpg" />';
    }
    if(is_page('contact')){
    echo '<img src="https://www.innerloopluxury.com/wp-content/themes/dodo/images/header_c.jpg" />';
    }
    if(is_page('neighborhood-nirvana')){
    echo '<img src="https://www.innerloopluxury.com/wp-content/themes/dodo/images/header_bp.jpg" />';
    }
    if(is_page('venue')){
    echo '<img src="https://www.innerloopluxury.com/wp-content/themes/dodo/images/header_v.jpg" />';
    }
    if(is_404()){
    echo '<img src="https://www.innerloopluxury.com/wp-content/themes/dodo/images/header_l.jpg" />';
    }
    if(is_page('lifestyle')){
    echo '<img src="https://www.innerloopluxury.com/wp-content/themes/dodo/images/header_l.jpg" />';
    }
    if(is_page('lifestyle')){
    echo '<img src="https://www.innerloopluxury.com/wp-content/themes/dodo/images/header_l.jpg" />';
    }
    ?>

    I edited a free template and created the pages with their content, and the blog is to display on the Lifstyle link/page – but the header is not working there.

    Any suggestions – ??

    Thanks,
    Kari

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Kari Mitchell

    (@kari-mitchell)

    Thank you for this Esmi,

    However – with the template I edited – when I try to utilize this method, I am getting an error on my navigation menu and the Lifestyle page is still not working.

    Thread Starter Kari Mitchell

    (@kari-mitchell)

    Is there anyone else using the PHP/header method I am using – ?? I hate to redo everything – it’s working fine except on one page. I am hoping its a PHP error – ??

    Thanks so much in advance – for any help.

    The theme doesn’t appear to be using the body_class() function. You need to add that to header.php first.

    Thread Starter Kari Mitchell

    (@kari-mitchell)

    Hi Esmi – I had added it and it completely messed up the navigation.

    You probably need to check your theme template files to ensure that they don’t use any of the same classes generated by body_class().

    you could try to:

    – use the page id of the ‘lifestyle’ page in your if statement, just to test it;
    (there might be a conflict with the tag of the same name)
    (makes me wonder: is ‘lifestyle’ a page at all, or a tag archive?)

    – move the ‘lifestyle’ if statement a few lines higher;

    Thread Starter Kari Mitchell

    (@kari-mitchell)

    Well – I added the ID (77) and a new page name/slug (blog) and that didnt work either. Lifestyle was both the page name and the slug – but was also a tag as well so it is likely a tag archive as well –

    I will try to move the if statement a few lines higher to see if it changes things –

    I had read somewhere that we needed an ELSE statement in there, but I do not know how that would look – and I tried one way and it turned an error.

    Thanks so much for the suggestions. I am not familiar with PHP enough to troubleshoot properly.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Different Header Graphics Per Page’ is closed to new replies.