[Theme: Simple Catch] Different sidebar in homepage
-
I would like to have a different sidebar for the posts page then the static front page. Using widgets on both.
I already have simple catch child theme and add this code in function.phpif ( function_exists( 'register_sidebar' ) ) { register_sidebar( array( 'name' => __( 'Home', 'simplecatch' ), 'id' => 'home', 'description' => __( 'Sidebar homepage', 'simplecatch' ), 'before_widget' => '<div class="widget">', 'after_widget' => '</div>', 'before_title' => '<h3>', 'after_title' => '</h3><hr/>' ) ); }
and replace this code in sidebar.php
if ( function_exists( 'dynamic_sidebar' ) ) { //displays 'sidebar' for all pages dynamic_sidebar( 'sidebar' ); } ?>
with this code
if ( function_exists('dynamic_sidebar')): if (is_home()) dynamic_sidebar('home'); else dynamic_sidebar('sidebar'); endif;
but it’s doesn’t work ??
Please advice….Thanks,
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘[Theme: Simple Catch] Different sidebar in homepage’ is closed to new replies.