• Hello! I would like a banner for just the blog page on the site. I did a search for this topic in the forum of course, and came across a similar post from 11 months ago. I followed the instructions laid out there by @britner however it is not working. My url is: https://www.writinglikeamadwoman.com and below are lines 82-90 of the header.php (using child theme). Please help!

    if (!empty($virtue[‘virtue_banner_upload’][‘url’])) {?>
    <div class=”container”>
    <div class=”virtue_banner”>
    <?php if(is_page(‘5’)) {
    echo ‘‘;
    } else {
    echo ‘‘;
    }?>
    </div>
    </div>
    <?php } ?>
    </header>

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter evelynworks

    (@evelynworks)

    oops just realized that the image comes up instead of url, here is code again with spaces:

    if (!empty($virtue[‘virtue_banner_upload’][‘url’])) {?>
    <div class=”container”>
    <div class=”virtue_banner”>
    <?php if(is_page(‘5’)) {
    echo ‘‘;
    } else {
    echo ‘‘;
    }?>
    </div>
    </div>
    <?php } ?>
    </header>

    Thread Starter evelynworks

    (@evelynworks)

    trying again with extra “h”:

    if (!empty($virtue[‘virtue_banner_upload’][‘url’])) {?>
    <div class=”container”>
    <div class=”virtue_banner”>
    <?php if(is_page(‘5’)) {
    echo ‘‘;
    } else {
    echo ‘‘;
    }?>
    </div>
    </div>
    <?php } ?>
    </header>

    Thread Starter evelynworks

    (@evelynworks)

    Weird! Image keeps showing up even with wrong url. So here it is with just, URL:

    if (!empty($virtue[‘virtue_banner_upload’][‘url’])) {?>
    <div class=”container”>
    <div class=”virtue_banner”>
    <?php if(is_page(‘5’)) {
    echo ‘‘;
    } else {
    echo ‘‘;
    }?>
    </div>
    </div>
    <?php } ?>
    </header>

    there are some ‘tricks’ to post code in the forum – please see https://codex.www.ads-software.com/Forum_Welcome#Posting_Code

    instead of:
    <?php if(is_page('5')) {
    try to use:
    <?php if(is_home()) {

    https://developer.www.ads-software.com/reference/functions/is_home/

    Thread Starter evelynworks

    (@evelynworks)

    @alchymyth — apologies and appreciated!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Different sitewide banner on blog page’ is closed to new replies.