• 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

Enterprise Pro Home Top

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 › Enterprise Pro Home Top

This topic is: not resolved

Tagged: Enterprise Pro

  • This topic has 5 replies, 4 voices, and was last updated 11 years, 3 months ago by Kent.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • March 4, 2014 at 10:03 pm #93466
    derekwberg
    Member

    I would love to put 2 widgets side by side (2 column) in the top home section of enterprise pro. I want an image on the left and a leadbox code (code from leadpages.net) in a text widget on the right. As of now I can get them to show up on top of each other but would love them to be side by side whole maintaining the responsiveness.

    Derek

    http://www.clarendonhillsmusicacademy.com/
    March 6, 2014 at 4:51 am #93639
    Pixel Frau
    Member

    You could add a Genesis column class to each widget. The code for the widgets in your front-page.php file might look something like this.

    function enterprise_home_top_widgets() {
    
    	genesis_widget_area( 'home-top-left', array(
    		'before' => '<div class="home-top-left widget-area one-half first"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    	genesis_widget_area( 'home-top-right', array(
    		'before' => '<div class="home-top-right widget-area one-half"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    	
    }
    March 11, 2014 at 9:07 am #94283
    derekwberg
    Member

    For some reason when I do that the home top disappears completely

    Here is all of the code for front page

    <?php
    /**
    * This file adds the Home Page to the Enterprise Pro Theme.
    *
    * @author StudioPress
    * @package Enterprise Pro
    * @subpackage Customizations
    */

    add_action( 'genesis_meta', 'enterprise_home_genesis_meta' );
    /**
    * Add widget support for homepage. If no widgets active, display the default loop.
    *
    */
    function enterprise_home_genesis_meta() {

    if ( is_active_sidebar( 'home-top' ) || is_active_sidebar( 'home-bottom' ) ) {

    //* Force full-width-content layout setting
    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

    //* Add enterprise-pro-home body class
    add_filter( 'body_class', 'enterprise_body_class' );

    //* Remove the default Genesis loop
    remove_action( 'genesis_loop', 'genesis_do_loop' );

    //* Add home top widgets
    add_action( 'genesis_after_header', 'enterprise_home_top_widgets' );

    //* Add home bottom widgets
    add_action( 'genesis_loop', 'enterprise_home_bottom_widgets' );

    }
    }

    function enterprise_body_class( $classes ) {

    $classes[] = 'enterprise-pro-home';
    return $classes;

    }

    function enterprise_home_top_widgets() {

    genesis_widget_area( 'home-top-left', array(
    'before' => '<div class="home-top-left widget-area one-half first"><div class="wrap">',
    'after' => '</div></div>',
    ) );

    genesis_widget_area( 'home-top-right', array(
    'before' => '<div class="home-top-right widget-area one-half"><div class="wrap">',
    'after' => '</div></div>',
    ) );

    }

    function enterprise_home_bottom_widgets() {

    genesis_widget_area( 'home-bottom', array(
    'before' => '<div class="home-bottom widget-area">',
    'after' => '</div>',
    ) );

    }

    genesis();

    March 14, 2014 at 4:41 am #94831
    Pixel Frau
    Member

    The widget areas are first defined in functions.php.

    //* Register widget areas
    genesis_register_sidebar( array(
    	'id'          => 'home-top',
    	'name'        => __( 'Home - Top', 'enterprise' ),
    	'description' => __( 'This is the top section of the homepage.', 'enterprise' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-bottom',
    	'name'        => __( 'Home - Bottom', 'enterprise' ),
    	'description' => __( 'This is the bottom section of the homepage.', 'enterprise' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'after-entry',
    	'name'        => __( 'After Entry', 'enterprise' ),
    	'description' => __( 'This is the after entry widget area.', 'enterprise' ),
    ) );

    Change home-top:

    genesis_register_sidebar( array(
    	'id'          => 'home-top',
    	'name'        => __( 'Home - Top', 'enterprise' ),
    	'description' => __( 'This is the top section of the homepage.', 'enterprise' ),
    ) );

    to this:

    genesis_register_sidebar( array(
    	'id'          => 'home-top-left',
    	'name'        => __( 'Home - Top Left', 'enterprise' ),
    	'description' => __( 'This is the top left section of the homepage.', 'enterprise' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-top-right',
    	'name'        => __( 'Home - Top Right', 'enterprise' ),
    	'description' => __( 'This is the top right section of the homepage.', 'enterprise' ),
    ) );

    Then take a look at this line in front-page.php:
    if ( is_active_sidebar( ‘home-top’ ) || is_active_sidebar( ‘home-bottom’ ) ) {

    This is saying to display 'home-top' and 'home-bottom' if they are active sidebars (widget areas). Since 'home-top' no longer exists, you need to change this to say:

    if ( is_active_sidebar( ‘home-top-left’ ) || is_active_sidebar( ‘home-top-right’ ) || is_active_sidebar( ‘home-bottom’ ) ) {

    September 26, 2014 at 11:34 am #125837
    Tim
    Member

    Thanks Julia, worked perfect for me.

    October 24, 2014 at 8:25 am #128972
    Kent
    Participant

    Hi all. I tried this and it's just not working for me. I dunno what I missed.

    My functions.php code:

    //* Register widget areas
    genesis_register_sidebar( array(
    	'id'          => 'home-top-left',
    	'name'        => __( 'Home - Top Left', 'enterprise' ),
    	'description' => __( 'This is the top left section of the homepage.', 'enterprise' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-top-right',
    	'name'        => __( 'Home - Top Right', 'enterprise' ),
    	'description' => __( 'This is the top right section of the homepage.', 'enterprise' ),
    ) );
    genesis_register_sidebar( array(
    	'id'          => 'home-bottom',
    	'name'        => __( 'Home - Bottom', 'enterprise' ),
    	'description' => __( 'This is the bottom section of the homepage.', 'enterprise' ),
    ) );

    My front-page.php code:

    add_action( 'genesis_meta', 'enterprise_home_genesis_meta' );
    /**
     * Add widget support for homepage. If no widgets active, display the default loop.
     *
     */
    function enterprise_home_genesis_meta() {
    
    	if ( is_active_sidebar( 'home-top-left' ) || is_active_sidebar( 'home-top-right' ) || is_active_sidebar( 'home-bottom' ) ) {
    
    		//* Force full-width-content layout setting
    		add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
    
    		//* Add enterprise-pro-home body class
    		add_filter( 'body_class', 'enterprise_body_class' );
    
    		//* Remove the default Genesis loop
    		remove_action( 'genesis_loop', 'genesis_do_loop' );
    
    		//* Add home top widgets
    		add_action( 'genesis_after_header', 'enterprise_home_top_widgets' );
    		
    		//* Add home bottom widgets
    		add_action( 'genesis_loop', 'enterprise_home_bottom_widgets' );
    
    	}
    }
    
    function enterprise_body_class( $classes ) {
    
    		$classes[] = 'enterprise-pro-home';
    		return $classes;
    		
    }
    
    function enterprise_home_top_widgets() {
    
    	genesis_widget_area( 'home-top-left', array(
    		'before' => '<div class="home-top-left widget-area"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    	
    	genesis_widget_area( 'home-top-right', array(
    		'before' => '<div class="home-top-right widget-area"><div class="wrap">',
    		'after'  => '</div></div>',
    	) );
    	
    }
    
    function enterprise_home_bottom_widgets() {
    	
    	genesis_widget_area( 'home-bottom', array(
    		'before' => '<div class="home-bottom widget-area">',
    		'after'  => '</div>',
    	) );
    
    }
    
    genesis();
    

    Any thoughts? As it is, it breaks my homepage at my site http://www.kiersdev.com/pnbc1/

    Is it because I haven't designated styles for the home-top-left and home-top-right widgets in my css?


    Dad. Biker. Designer. | kentfackenthall.com

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 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

© 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