Forum Replies Created
Viewing 2 posts - 1 through 2 (of 2 total)
-
AuthorPosts
-
FrederikaMember
Well I figured out the custom code for the 3 side by side widgets by borrowing and adjusting from the agency theme.
I'm now not sure how to get it only on the homepage. Right now the 3 widgets are on every page of the site.
// Register widget genesis_register_sidebar( array( 'id' => 'home-left', 'name' => __( 'Home Left', 'prose' ), 'description' => __( 'This is the left section of the homepage.', 'prose' ), ) ); genesis_register_sidebar( array( 'id' => 'home-middle', 'name' => __( 'Home Middle', 'prose' ), 'description' => __( 'This is the middle section of the homepage.', 'prose' ), ) ); genesis_register_sidebar( array( 'id' => 'home-right', 'name' => __( 'Home Right', 'prose' ), 'description' => __( 'This is the right section of the homepage.', 'prose' ), ) ); add_action( 'genesis_before_content_sidebar_wrap', 'custom_before_content', 9 ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function custom_before_content() { if ( is_home() && is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' ) ) { echo '<div id="home">'; echo '<div class="home-left">'; dynamic_sidebar( 'home-left' ); echo '</div><!-- end .home-left -->'; echo '<div class="home-middle">'; dynamic_sidebar( 'home-middle' ); echo '</div><!-- end .home-middle -->'; echo '<div class="home-right">'; dynamic_sidebar( 'home-right' ); echo '</div><!-- end .home-right -->'; echo '</div><!-- end #home -->'; } }
FrederikaMember -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)