• Resolved mmcgowan22

    (@mmcgowan22)


    When I created a child theme a banner image showed up. It is the screenshot image for the theme. I can’t find it to get rid of it or to put something else in the widget-banner. There is no content in the widget-banner and when I try to put something else in there it does not show up.

Viewing 5 replies - 16 through 20 (of 20 total)
  • Ok, Sushil. That brought back the banner image for the contact page but I’m still missing the slider for the home page. Keep in mind that just as I’ve said before, everything was working great before the theme upgrade so that should explain that I’m using the Jetpack plugin to show the images within the banner on the pages that I want.

    For some reason when I made the change that Sushil suggested it did bring back the contact banner image but it removed the home page banner. No banner can be placed on the home page at all now. It should have this slider on this test page within the same site, https://www.sixmilebaptistchurch.org/testpage/
    Widget is correctly setup using the Jetpack Visibility or else I wouldn’t be able to post different images on different pages.

    Hi there,

    You can find this following code on sidebar-banner.php onl line no 19-24

    elseif ( ! is_front_page() && ( get_theme_mod( 'show_banner_on_pages' ) != '') ) { ?>
    	<div id="pref-banner" style="border-color: <?php echo get_theme_mod( 'banner_border', '#cde4ec' ); ?>; padding:<?php echo get_theme_mod( 'banner_pad', '0 0 0 0' ); ?>">
            <?php   dynamic_sidebar( 'banner' );
        echo '</div>';
    
    } else {

    Replace the above code with this following code:

    elseif ( is_front_page() && ( get_theme_mod( 'show_banner_on_pages' ) != '') ) { ?>
    	<div id="pref-banner" style="border-color: <?php echo get_theme_mod( 'banner_border', '#cde4ec' ); ?>; padding:<?php echo get_theme_mod( 'banner_pad', '0 0 0 0' ); ?>">
            <?php   dynamic_sidebar( 'banner' );
        echo '</div>';
    
    } else {

    It may solve your issue.

    Thank

    That fixed the home page slider but it also removed all the other page banners again.

    Oh , it’s really frustrating.

    -> Create child theme and create new file called sidebar-banner.php , then paste the below code on sidebar-banner.php

    <?php
    /**
     * Sidebar for the banner area
     *
     * @package Preferential-child
     * @since 2.0.0
     */
    
    if(! is_active_sidebar( 'banner' ) && is_front_page() && (get_theme_mod ( 'hide_default_banner' ) == '' ) ) { ?>
    	<div id="pref-banner" style="border-color: <?php echo get_theme_mod( 'banner_border', '#cde4ec' ); ?>; padding:<?php echo get_theme_mod( 'banner_pad', '0 0 0 0' ); ?>">
    	    <div class="textwidget">
    	        <img src="<?php echo get_template_directory_uri().'/images/prefential-banner.jpg'; ?>" alt="preferential-lite">
    	    </div>
        </div>  <?php
    } elseif (is_front_page() && ( get_theme_mod ( 'show_banner_on_pages' ) == '') ) { ?>
        <div id="pref-banner" style="border-color: <?php echo get_theme_mod( 'banner_border', '#cde4ec' ); ?>; padding:<?php echo get_theme_mod( 'banner_pad', '0 0 0 0' ); ?>">
            <?php   dynamic_sidebar( 'banner' );
        echo '</div>';
    } elseif ( get_theme_mod( 'show_banner_on_pages' ) != '' ) { ?>
    	<div id="pref-banner" style="border-color: <?php echo get_theme_mod( 'banner_border', '#cde4ec' ); ?>; padding:<?php echo get_theme_mod( 'banner_pad', '0 0 0 0' ); ?>">
            <?php   dynamic_sidebar( 'banner' );
        echo '</div>';
    
    } else {
    	return false;
    }

    Note: Using child theme will prevent you csutom changes on theme update

    Thanks

Viewing 5 replies - 16 through 20 (of 20 total)
  • The topic ‘Banner Image’ is closed to new replies.