• 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

Agency Theme Add Home Section

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 › Agency Theme Add Home Section

This topic is: not resolved

Tagged: Agency, register, widgets

  • This topic has 11 replies, 3 voices, and was last updated 12 years, 4 months ago by Helen.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • February 3, 2013 at 1:44 pm #17654
    Mack
    Member

    I am trying to add home-left-center, middle-center, right-center and the same for bottom. I want 3 separate sections.

    I have registered the sidebars:

    genesis_register_sidebar( array(
    'id' => 'home-left-center',
    'name' => __( 'Home Left-2', 'agency' ),
    'description' => __( 'This is the second (2) middle section of the homepage.', 'agency' ),
    ) );

    genesis_register_sidebar( array(
    'id' => 'home-middle-center',
    'name' => __( 'Home Middle-2', 'agency' ),
    'description' => __( 'This is the second (2) middle section of the homepage.', 'agency' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-right-center',
    'name' => __( 'Home Right-2', 'agency' ),
    'description' => __( 'This is the second (2) right section of the homepage.', 'agency' ),
    ) );

    I have added the CSS:

    /* Home------------------------------------------------------------ */
    .home-center #inner {
    margin: 30px auto 0;
    }

    #home-center {
    font-size: 14px;
    }

    #home-center p {
    font-size: inherit;
    }

    .home-left-center {
    float: left;
    margin: 0 30px 0 0;
    width: 280px;
    }

    .home-middle-center {
    float: left;
    width: 280px;
    }

    .home-right-center {
    float: right;
    width: 280px;
    }

    I am struggling with the home page. This is what I have:

    function agency_home_loop_helper() {

    if ( is_active_sidebar( 'home-left' ) || is_active_sidebar( 'home-middle' ) || is_active_sidebar( 'home-right' )) {

    echo '<div id="home">';

    echo '<div class="home-left">';
    dynamic_sidebar( 'home-left' );
    echo '</div><!-- end .home-left -->';

    echo '<div class="home-middle">';
    dynamic_sidebar( 'home-middle' );
    echo '</div><!-- end .home-middle -->';

    echo '<div class="home-right">';
    dynamic_sidebar( 'home-right' );
    echo '</div><!-- end .home-right -->';

    echo '</div><!-- end #home -->';

    }

    }
    function agency_home_center_loop_helper() {

    if ( is_active_sidebar( 'home-left-center' ) || is_active_sidebar( 'home-middle-center' ) || is_active_sidebar( 'home-right-center' )) {

    echo '<div id="home-center">';

    echo '<div class="home-left-center">';
    dynamic_sidebar( 'home-left-2' );
    echo '</div><!-- end .home-left-2 -->';

    echo '<div class="home-middle-center">';
    dynamic_sidebar( 'home-middle-2' );
    echo '</div><!-- end .home-middle-2 -->';

    echo '<div class="home-right-center">';
    dynamic_sidebar( 'home-right-2' );
    echo '</div><!-- end .home-right-2 -->';
    echo '</div><!-- end #home-center -->';

    }

    }

    I really need some assistance. Thanks in advance for your help.

    Mack Biggs

    February 3, 2013 at 2:47 pm #17668
    SoZo
    Member

    That's not the entire home.php coder is it? Did you add the action which loads the function?


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    February 3, 2013 at 3:11 pm #17681
    Mack
    Member

    John,

    "Did you add the action which loads the function?"

    I wish I knew what that is????

    I need to have to more left, middle and right separate from each other.

    Here is a link: http://www.faganandassociatesinc.com

    As always, I appreciate your assistance!!

     

    Mack

    February 3, 2013 at 3:33 pm #17683
    SoZo
    Member

    Take a look at steps 3 and 4 in the example here. And you can learn more about the add_action function here.


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    February 4, 2013 at 4:36 pm #18054
    Mack
    Member

    I thought I did all of that. I just need to have two more rows, center and bottom of the home left, middle and right.

    This is now two days of pulling out my hair with this.

    I have registered the Widgets in the Functions and they appear correctly in the Widget Admin area.

    I tried the:

    genesis_widget_area( 'home-left-center', array( 'before' => '<div id="home-left-center" class="widget-area">' ) || 'home-middle-center', array( 'before' => '<div id="home-middle-center" class="widget-area">' ) || 'home-right-center', array( 'before' => '<div id="home-right-center" class="widget-area">' ));
    echo '<div id="home-center">';

    echo '<div class="home-left-center">';
    dynamic_sidebar( 'home-left-center' );
    echo '</div><!-- end .home-left-center -->';

    echo '<div class="home-middle-center">';
    dynamic_sidebar( 'home-middle-center' );
    echo '</div><!-- end .home-middle-center -->';

    echo '<div class="home-right-center">';
    dynamic_sidebar( 'home-right-center' );
    echo '</div><!-- end .home-right-center -->';

    echo '</div><!-- end #home-center -->';

    But no go!!

    February 4, 2013 at 6:44 pm #18112
    Mack
    Member

    PS:

    I have the following in my functions.php

    genesis_register_sidebar( array(
    'id' => 'home-left-center',
    'name' => __( 'Home Left-center', 'agency' ),
    'description' => __( 'This is the second (center) left section of the homepage.', 'agency' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-middle-center',
    'name' => __( 'Home Middle-center', 'agency' ),
    'description' => __( 'This is the second (center) middle section of the homepage.', 'agency' ),
    ) );
    genesis_register_sidebar( array(
    'id' => 'home-right-center',
    'name' => __( 'Home Right-center', 'agency' ),
    'description' => __( 'This is the second (center) right section of the homepage.', 'agency' ),
    ) );

    February 5, 2013 at 12:45 pm #18257
    SoZo
    Member

    The original home loop is added with this add_action

    		add_action( 'genesis_loop', 'agency_home_loop_helper' );

    So you either need to add another one for your new function or move your divs in to the agency_home_loop_helper function.

    E.g.

    add_action( 'genesis_after_loop', 'agency_home_center_loop_helper' );

    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    February 5, 2013 at 1:00 pm #18270
    Mack
    Member

    Thanks John,

     

    Now the calendar (test for widget) appears in the same widget area as left,middle and center.

    How do I get it in it's own container???? Or is it #inner??????

    For a coder this would take five minutes. I am on day 3 of trying to sort this out.

    Would be nice if there was a tutorial like this only specific for this theme and this requirement. I have seen several posts asking how to do this.

    They send folks to cryptic how to's.

    None of this makes any sense to me.

    February 5, 2013 at 1:01 pm #18271
    SoZo
    Member

    You should be able to use a different hook like genesis_before_footer


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    February 5, 2013 at 1:33 pm #18283
    Mack
    Member

    John,

    Thanks for your continued support!!

    I added this to functions.php:

    add_action(‘genesis_before_footer’, ‘child_home_center_after_loop’);

    I added this to home.php

    add_action( 'genesis_before_footer', 'agency_home_center_loop_helper' );

    Then placed this code in home.php:

    function agency_home_center_loop_helper() {
    if ( is_active_sidebar( 'home-left-center' ) || is_active_sidebar( 'home-middle-center' ) || is_active_sidebar( 'home-right-center' )) {

    echo '<div id="home">';

    echo '<div class="home-left-center">';
    dynamic_sidebar( 'home-left-center' );
    echo '</div><!-- end .home-left -->';

    The calendar is now just above the actual footer and below the footer widgets.

    I need it between the home left,middle, right and the footer widgets in it's own #inner

    See it here: http://faganandassociatesinc.com/

    February 5, 2013 at 1:54 pm #18287
    Mack
    Member

    I fixed the function: from: add_action(‘genesis_before_footer’, ‘child_home_center_after_loop’);

    to: add_action(‘genesis_before_footer’, ‘agency_home_center_after_loop’);

    Still the same.

    February 8, 2013 at 1:52 pm #19028
    Helen
    Member

    Hello, I am trying to do the same thing, although not with adding new widget areas but with moving the home welcome and slider widgets to below the home left/middle/right widgets and I can move them, but they appear in the same widgget area as home left/middle/right, I also want them ina separate container like Mack is saying..... Have been fooling around with the css, but can't figure it out...

    Has anyone been able to do this?

     

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