minimum theme remove widget

Community Forums Forums General Discussion minimum theme remove widget

This topic is: resolved

This topic contains 2 replies, has 2 voices, and was last updated by  Nomad 1 year, 6 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #38552

    Nomad
    Participant
    Post count: 27

    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

    #38561

    braddalton
    Participant
    Post count: 10350

    Line 572 child theme style.css file, change to this:

    [css]
    .home-featured-1,
    .home-featured-2,
    .home-featured-3 {
    float: left;
    margin: 0;
    overflow: hidden;
    text-align: center;
    width: 33.333333333333%;
    }
    [/css]

    Modified home.php:
    [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();
    [/php]

    Remove Register widget areas from functions.php so you’re left with:
    [php]
    /** 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’ ),
    ) );
    [/php]

    Looks pretty good to me but may need some small mods.


    #38564

    Nomad
    Participant
    Post count: 27

    awesome Brad…perfect…..thank you

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘minimum theme remove widget’ is closed to new replies.