• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

minimum theme remove widget

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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 9 years, 11 months ago by Nomad.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 30, 2013 at 8:00 am #38552
    Nomad
    Member

    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 #38561
    Brad Dalton
    Participant

    Line 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.


    Tutorials for StudioPress Themes.

    April 30, 2013 at 9:18 am #38564
    Nomad
    Member

    awesome Brad...perfect.....thank you

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘minimum theme remove widget’ is closed to new replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble