Check front page or not on sidebar-banner.php
. is_front_page
Do yourself or replace the sidebar-banner.php
code by the below code.
<?php
/**
* Sidebar for the banner area and the Header Caption option
* @package Pure_and_Simple
* @since 1.0.0
*/
if ( is_front_page() ) {
$hide_defaults = get_theme_mod('hide_default_content','0');
if ( ! is_active_sidebar( 'banner' ) && (!$hide_defaults) ): ?>
<aside class="widget-area" role="complementary"><div id="page-banner" role="banner">
<img src="<?php echo esc_url( get_template_directory_uri() ); ?>/images/banner.jpg" />
</div></aside>
<?php
elseif(is_active_sidebar( 'banner' ) ):
echo '<aside class="widget-area" role="complementary"><div id="page-banner" role="banner">';
dynamic_sidebar( 'banner' );
echo '</div></aside>';
else:
return;
endif;
}
?>
If not work, let me know.
Note: Child theme is recommended to customize theme.
Thanks
Hi!
Thanks so much for the code.
Just before i try – i’m not very confident with CSS codes.
I have a plugin called Simple CSS can i simply paste it into here or do i have to go into the themes CSS?
Thanks.
Hi i just tried to past that in and it didn’t work!
I hope i’m doing it right…