Community Forums › Forums › Archived Forums › General Discussion › minimum theme remove widget
This topic is: resolved
- This topic has 2 replies, 2 voices, and was last updated 11 years, 7 months ago by Nomad.
Viewing 3 posts - 1 through 3 (of 3 total)
-
AuthorPosts
-
April 30, 2013 at 8:00 am #38552NomadMember
Hi...am having a bit of a brain freeze today...how do i remove the "Home Feature #4" widget from minimum themes home page so that the previous three will margin:0 auto; for alignment?
thank you
April 30, 2013 at 8:54 am #38561Brad DaltonParticipantLine 572 child theme style.css file, change to this:
.home-featured-1, .home-featured-2, .home-featured-3 { float: left; margin: 0; overflow: hidden; text-align: center; width: 33.333333333333%; }
Modified home.php:
<?php remove_action( 'genesis_after_post_content', 'genesis_post_meta' ); remove_action( 'genesis_loop', 'genesis_do_loop' ); add_action( 'genesis_meta', 'minimum_home_genesis_meta' ); /** * Add widget support for homepage. If no widgets active, display the default loop. * */ function minimum_home_genesis_meta() { if ( is_active_sidebar( 'home-featured-1' ) || is_active_sidebar( 'home-featured-2' ) || is_active_sidebar( 'home-featured-' ) ) { add_action( 'genesis_after_header', 'minimum_home_featured', 15 ); add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); add_filter( 'body_class', 'minimum_add_body_class' ); function minimum_add_body_class( $classes ) { $classes[] = 'minimum'; return $classes; } } } function minimum_home_featured() { echo '<div id="home-featured"><div class="wrap">'; genesis_widget_area( 'home-featured-1', array( 'before' => '<div class="home-featured-1 widget-area">', ) ); genesis_widget_area( 'home-featured-2', array( 'before' => '<div class="home-featured-2 widget-area">', ) ); genesis_widget_area( 'home-featured-3', array( 'before' => '<div class="home-featured-3 widget-area">', ) ); echo '</div><!-- end .wrap --></div><!-- end #home-featured -->'; } add_action( 'genesis_loop', 'minimum_grid_loop_helper' ); function minimum_grid_loop_helper() { if ( function_exists( 'genesis_grid_loop' ) ) { genesis_grid_loop( array( 'features' => 0, 'feature_image_size' => 'featured', 'feature_image_class' => 'post-image', 'feature_content_limit' => 0, 'grid_image_size' => 0, 'grid_image_class' => 'alignnone', 'grid_content_limit' => 250, 'more' => __( '[Read more]', 'minimum' ), ) ); } else { genesis_standard_loop(); } } genesis();
Remove Register widget areas from functions.php so you're left with:
/** Register widget areas */ genesis_register_sidebar( array( 'id' => 'home-featured-1', 'name' => __( 'Home Featured #1', 'minimum' ), 'description' => __( 'This is the home featured #1 section.', 'minimum' ), ) ); genesis_register_sidebar( array( 'id' => 'home-featured-2', 'name' => __( 'Home Featured #2', 'minimum' ), 'description' => __( 'This is the home featured #2 section.', 'minimum' ), ) ); genesis_register_sidebar( array( 'id' => 'home-featured-3', 'name' => __( 'Home Featured #3', 'minimum' ), 'description' => __( 'This is the home featured #3 section.', 'minimum' ), ) ); genesis_register_sidebar( array( 'id' => 'custom-footer', 'name' => __( 'Custom Footer', 'minimum' ), 'description' => __( 'This is the custom footer section.', 'minimum' ), ) );
Looks pretty good to me but may need some small mods.
April 30, 2013 at 9:18 am #38564NomadMemberawesome Brad...perfect.....thank you
-
AuthorPosts
Viewing 3 posts - 1 through 3 (of 3 total)
- The topic ‘minimum theme remove widget’ is closed to new replies.