• 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

News Pro – How to duplicate home page widget areas

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 › News Pro – How to duplicate home page widget areas

This topic is: resolved
  • This topic has 3 replies, 2 voices, and was last updated 7 years, 3 months ago by buddy_boy8403.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • March 15, 2019 at 7:40 am #490079
    buddy_boy8403
    Participant

    I would like to duplicate the Home - Top, Home - Middle Left, Home - Middle Right, and Home - Bottom widget areas further down on the page, essentially doubling the amount of content that can be shared on the home page. I don't want to add content to what is already there - I want to duplicate the main genesis content so the Home - Top is both at the top of the page and also down further below the Home - Bottom, and continue duplicating all home widgets until I have a whole other section of content I can display further down the home page. Hopefully I'm explaining this right. Let me know if there are questions about what I'm trying to achieve, and thank you for your help!

    https://continentalenews.com
    March 15, 2019 at 8:01 am #490080
    Victor Font
    Moderator

    You have to define the new widget areas in functions.php. The current widget area definitions are near the bottom of the file. You define them with the genesis_register_sidebar() function. Just follow the examples that are already there.

    Then, you have to display them in front-page.php. Modify the news_home_genesis_meta() function to check if they have content. Then, modify the news_homepage_widgets() functions to display them.

    You can't duplicate them exactly because their names must be unique.

    Also, don't use the WordPress editor to modify PHP. If you make a mistake with just 1 character, you'll bring your site down and will have to fix things through FTP. It's best to use FTP in the first place and edit the files in your local environment with a real editor.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 18, 2019 at 12:32 pm #490118
    buddy_boy8403
    Participant

    Victor:

    I'm having trouble with this. Is there a tutorial somewhere that walks through these steps as an example specific to the News Pro theme?

    March 18, 2019 at 2:24 pm #490121
    buddy_boy8403
    Participant

    I've added the following to functions.php:

    //Adam- Register widget areas to duplicate top home page
    
    genesis_register_sidebar( array(
    
    	'id'          => 'home-top-lower',
    
    	'name'        => __( 'Home - Top - Lower', 'news-pro' ),
    
    	'description' => __( 'This is the lower top section of the homepage.', 'news-pro' ),
    
    ) );
    
    genesis_register_sidebar( array(
    
    	'id'          => 'home-middle-left-lower',
    
    	'name'        => __( 'Home - Middle Left - Lower', 'news-pro' ),
    
    	'description' => __( 'This is the lower middle left section of the homepage.', 'news-pro' ),
    
    ) );
    
    genesis_register_sidebar( array(
    
    	'id'          => 'home-middle-right-lower',
    
    	'name'        => __( 'Home - Middle Right - Lower', 'news-pro' ),
    
    	'description' => __( 'This is the lower middle right section of the homepage.', 'news-pro' ),
    
    ) );
    
    genesis_register_sidebar( array(
    
    	'id'          => 'home-bottom-lower',
    
    	'name'        => __( 'Home - Bottom - Lower', 'news-pro' ),
    
    	'description' => __( 'This is the lower bottom section of the homepage.', 'news-pro' ),
    
    ) );

    Modified the function news_home_genesis_meta() in front-page.php to:

    	if ( is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-top-lower' ) || is_active_sidebar( 'home-middle-left' ) || is_active_sidebar( 'home-middle-left-lower' ) || is_active_sidebar( 'home-middle-right' ) || is_active_sidebar( 'home-middle-right-lower' ) || is_active_sidebar( 'home-bottom' ) || is_active_sidebar( 'home-bottom-lower' ) ) {
    
    		// Force content-sidebar layout setting.
    
    		add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' );
    
    		// Add news-home body class.
    
    		add_filter( 'body_class', 'news_body_class' );
    
    		// Add content heading.
    
    		add_action( 'genesis_before_loop', 'news_content_heading' );
    
    	}
    
    	if ( is_active_sidebar( 'home-top' ) ) {
    
    		// Add excerpt length filter.
    
    		add_action( 'genesis_before_loop', 'news_top_excerpt_length' );
    
    		// Add homepage widgets.
    
    		add_action( 'genesis_before_loop', 'news_homepage_top_widget' );
    
    		// Remove excerpt length filter.
    
    		add_action( 'genesis_before_loop', 'news_remove_top_excerpt_length' );
    
    	}
    
    	if ( is_active_sidebar( 'home-middle-left' ) || is_active_sidebar( 'home-middle-left-lower' ) || is_active_sidebar( 'home-middle-right' ) || is_active_sidebar( 'home-middle-right-lower' ) || is_active_sidebar( 'home-bottom' ) || is_active_sidebar( 'home-bottom-lower' ) || is_active_sidebar( 'home-top-lower' ) ) {
    
    		// Remove the default Genesis loop.
    
    		remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    		// Add homepage widgets.
    
    		add_action( 'genesis_loop', 'news_homepage_widgets' );
    
    	}
    
    }

    And used the following to output the widget areas in front-page.php:

    // Output the home-top-lower widget area.
    
    function news_homepage_top_lower_widget() {
    
    	genesis_widget_area( 'home-top-lower', array(
    
    		'before' => '<div class="home-top-lower widget-area">',
    
    		'after'  => '</div>',
    
    	) );
    
    }
    
    // Output the home-middle and home-bottom widget areas.
    
    function news_homepage_lower_widgets() {
    
    	if ( is_active_sidebar( 'home-middle-left-lower' ) || is_active_sidebar( 'home-middle-right-lower' ) ) {
    
    		echo '<div class="home-middle-lower">';
    
    		genesis_widget_area( 'home-middle-left-lower', array(
    
    			'before' => '<div class="home-middle-left-lower widget-area">',
    
    			'after'  => '</div>',
    
    		) );
    
    		genesis_widget_area( 'home-middle-right-lower', array(
    
    			'before' => '<div class="home-middle-right-lower widget-area">',
    
    			'after'  => '</div>',
    
    		) );
    
    		echo '</div>';
    
    	}
    
    	genesis_widget_area( 'home-bottom-lower', array(
    
    		'before' => '<div class="home-bottom-lower widget-area">',
    
    		'after'  => '</div>',
    
    	) );
    
    }

    No php errors are thrown on the page, and the new widget areas do show in the back end. When I add content to them, nothing displays on the home page. Tried deleting cache and reloading the page - nada. When I try to follow other tutorials I find online, the site breaks. Can you tell me what I'm doing wrong? Again, the objective is to duplicate the four News Pro widget areas further on down the page using the exact same styling.

  • Author
    Posts
Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘News Pro – How to duplicate home page widget areas’ 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

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