• 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

Show only Generate Box and Footer widgets on Homepage

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 › Design Tips and Tricks › Show only Generate Box and Footer widgets on Homepage

This topic is: resolved

Tagged: generate

  • This topic has 6 replies, 4 voices, and was last updated 12 years, 4 months ago by derekalvarez.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • February 6, 2013 at 2:18 pm #18493
    Antonios
    Member

    I would like my home page to show only the generate box and the three column footer widgets .  In the wordpress settings I have to choose to show blog or static page on the home page.  Is there a way around this? Seee my site at http://2mmpartners.com

    here is the code in my front-page.php

    <?php

    /** Add Generate Box after header **/
    add_action( 'genesis_after_header', 'generate_box', 10 );
    function generate_box() {

    if ( is_active_sidebar( 'generate-box' ) ) {
    echo '<div id="generate-box"><div class="wrap">';
    dynamic_sidebar( 'generate-box' );
    echo '</div><!-- end .wrap --></div><!-- end #generate-box -->';
    }

    }

    genesis();


    Antonios @AntoniosHadji
    FueltheBodyWell.com

    February 7, 2013 at 1:55 am #18597
    Brad Dalton
    Participant

    An easy way to do this would be to install the Widget Logic plugin and add is_home() to the widget logic field which is added to all widgets.

    Don't forget you also have Generate Box plugin settings like this:

    Display Settings > Enable and display Generate Box > Enable Generate Box on front page?


    Tutorials for StudioPress Themes.

    February 7, 2013 at 9:02 pm #18836
    Antonios
    Member

    Thanks for the response but the Generate box is fine the way it is.  I'm trying to remove the front page requirement so that the only thing that shows up is the generate box and footer widgets.  right now there is a page in the middle of these items that is displaying.


    Antonios @AntoniosHadji
    FueltheBodyWell.com

    February 8, 2013 at 1:33 am #18876
    Brad Dalton
    Participant

    Many ways to do this. Using CSS and display:none is the easy way but its not best practice:

    .home #content{
    display: none;
    }
    

    Here i added the generate box using php to a copy of the landing page template using a conditional tag and editing the different elements which are filtered out using the default remove action for the landing page:

    /** Add Generate Box after header **/
    add_action( 'genesis_after_header', 'generate_box', 10 );
    function generate_box() {
    
    	if ( is_page( '37533' ) ) {
    		echo '<div id="generate-box"><div class="wrap">';
    		dynamic_sidebar( 'generate-box' );
    		echo '</div><!-- end .wrap --></div><!-- end #generate-box -->';
    	}
    
    }
    
    // Remove header, navigation, breadcrumbs, footer widgets, footer 
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs');
    
    genesis();
    
    .page-id-37533 #content{
    display: none;
    }
    

    Creating a custom home.php or custom page template is better than using CSS to hide content.


    Tutorials for StudioPress Themes.

    February 8, 2013 at 7:41 am #18917
    Hard Boiled Greg
    Member

    Hi,

    I'm not sure about what you are doing with the front-page.php as the Generate theme doesn't have that file "out-of-the-box"

    To accomplish what you are after with a default install, you would open home.php and delete:

    add_action( 'genesis_loop', 'child_grid_loop_helper' );
    /** Add support for Genesis Grid Loop **/
    function child_grid_loop_helper() {
    
    	if ( function_exists( 'genesis_grid_loop' ) ) {
    		remove_action( 'genesis_before_post_content', 'generate_post_image', 5 );
    		genesis_grid_loop( array(
    			'features' => 2,
    			'feature_image_size' => 'featured',
    			'feature_image_class' => 'alignleft post-image',
    			'feature_content_limit' => 0,
    			'grid_image_size' => 'grid',
    			'grid_image_class' => 'alignleft post-image',
    			'grid_content_limit' => 0,
    			'more' => __( 'Continue reading...', 'genesis' ),
    			'posts_per_page' => 6,
    		) );
    	} else {
    		genesis_standard_loop();
    	}
    
    }

    And then add:

    .home #inner {
         display: none;   
    }

    to your CSS file to remove the empty div

    Again, this is how to do it without your custom front-page.php file.

    Let me know how you make out.

    Hard Boiled Greg


    Website: Hard Boiled Greg Twitter: @hbgreg

    February 8, 2013 at 9:42 pm #19158
    Antonios
    Member

    thanks Greg, that's what I was looking for.


    Antonios @AntoniosHadji
    FueltheBodyWell.com

    February 21, 2013 at 1:03 pm #22029
    derekalvarez
    Member

    Hi Greg, what about if I want to remove the blog posts and sidebar from the home page, and instead add a full-width widget? I used this tutorial to add a home page widget...

    http://my.studiopress.com/tutorials/register-widget-area/

    ...but I'm struggling with what code I should add to the home.php file.

    Website url is...

    http://tucsoncarservice.net/

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

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

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2025 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