• 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

Adding new widget area (Agency Theme)

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 › Adding new widget area (Agency Theme)

This topic is: not resolved

Tagged: Add Extra Widgets., Agency Widgets

  • This topic has 8 replies, 5 voices, and was last updated 13 years, 3 months ago by matryx.
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • November 16, 2012 at 4:11 pm #368
    halestorm
    Member

    Hello,

    I'm trying to add a new widget area in the Agency Theme. I'm not very well versed in PHP so I'm not 100% sure what to do.

    I did the functions thing. It's in the widget area. All good.

    But it's not displaying on the home page the way I want it.

    I want it to appear under the 3 home left, center, and right area in it's own bubble.

    Here is how I have the code in home.php:
    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>';

    dynamic_sidebar( 'home-left' );

    echo '</div><!-- end .home-left -->';

    echo '<div>';

    dynamic_sidebar( 'home-middle' );

    echo '</div><!-- end .home-middle -->';

    echo '<div>';

    dynamic_sidebar( 'home-right' );

    echo '</div><!-- end .home-right -->';

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

    }

    if ( is_active_sidebar( 'home-banner' ) ) {

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

    dynamic_sidebar( 'home-banner' );

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

    }
    }

     

     

     

    So the way it's displaying now is the widget I'm trying to add is INSIDE the bubble that the 3 other widgets are.

    I want it outside that bubble just under it. I'm thinking I need to add another function agency_home_loop_helper() type call but I have no idea what. I'm sure it's something simple I'm missing..

    Any help would be great! Here is the site in question: http://174.132.169.61/~wsiebiz/

    Thanks,
    Daniel

    November 16, 2012 at 4:56 pm #372
    Jon Weiss
    Member

    Looks to me like you want to pop that outside the content area, rather than have it display within the content div. There are several ways to do it, all of which are fine for your purposes. Let me know if you need further help and I'll try to put some code together for you when I have a minute.


    View My Site – Two W Media.com | I’m a Recommended StudioPress Customizer

    November 16, 2012 at 5:06 pm #378
    halestorm
    Member

    Yeah I tried what you are saying and I put the code of the widget (at least what I think is the widget out side of the what I think is just the area below the 3 middle widget but now the banner is on the top.  Just not 100% sure what I'm missing.  Here is what I did:

    <code>

    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 -->';

     

    }

    }

    if ( is_active_sidebar( 'home-banner' ) ) {

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

    dynamic_sidebar( 'home-banner' );

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

    }

     

    </code>

    http://174.132.169.61/~wsiebiz/

    November 16, 2012 at 5:35 pm #382
    halestorm
    Member

    Here is the code for the whole home.php if that helps.

    <?php

    add_action( 'genesis_meta', 'agency_home_genesis_meta' );

    /**

    * Add widget support for homepage. If no widgets active, display the default loop.

    *

    */

    function agency_home_genesis_meta() {

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

    remove_action( 'genesis_loop', 'genesis_do_loop' );

    add_action( 'genesis_after_header', 'agency_home_welcome_helper' );

    add_action( 'genesis_loop', 'agency_home_loop_helper' );

    add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );

    add_filter( 'body_class', 'add_body_class' );

    function add_body_class( $classes ) {

    $classes[] = 'agency';

    return $classes;

    }

    }

    }

    function agency_home_welcome_helper() {

    if ( is_active_sidebar( 'home-welcome' ) ) {

    echo '';

    dynamic_sidebar( 'home-welcome' );

    echo '';

    }

    if ( is_active_sidebar( 'home-slider' ) ) {

    echo '';

    dynamic_sidebar( 'home-slider' );

    echo '';

    }

    }

    function agency_home_loop_helper() {

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

    echo '';

    echo '';

    dynamic_sidebar( 'home-left' );

    echo '';

    echo '';

    dynamic_sidebar( 'home-middle' );

    echo '';

    echo '';

    dynamic_sidebar( 'home-right' );

    echo '';

    echo '';

    }

    }

    if ( is_active_sidebar( 'home-banner' ) ) {

    echo '';

    dynamic_sidebar( 'home-banner' );

    echo '';

    }

    genesis();

    November 28, 2012 at 1:26 pm #2080
    halestorm
    Member

    I think this got buried...  So I'm refreshing it...

    November 29, 2012 at 1:43 pm #2367
    [email protected]
    Member

    I have the same issue.  What is the solution?

    November 29, 2012 at 9:48 pm #2455
    [email protected]
    Member

    Never mind......issue fixed.

    January 16, 2013 at 10:26 pm #12562
    ChicGeek
    Member

    Hi,

    Trying to do the same as described above. I need to duplicate the home-right, middle and left and the bubble. Was able to add the extra widgets, but they appeared below and not in their own bubble.

    Can someone post the solution. Any help appreciated!

    Thanks,

    Elisha


    The Pixel Spot ♥ A Recommended STUDIOPRESS Customizer ♥ I Tweet

    Genesis Junkie + Web & Graphic Designer + Ad World Girl + Student of Life

    March 21, 2013 at 6:25 pm #30334
    matryx
    Member

    Hi Everyone

    I am trying to add a new full size widget area under the three content boxes. I can register the widget with out any problems in the function.php but I really do not know where to add the code on the Home.php

    The code for the functions file...

    genesis_register_sidebar( array(
    'id'            => 'home-optin',
    'name'            => __( 'Home Three', 'agency' ),
    'description'    => __( 'This is the optin section of the homepage.', 'agency' ),
    ) );

    The new widget needs to be the same width as the slider but under the content boxes and above the footer widgets you can see the site here - http://www.buzinga.com.au/

    Do I need to add the || is_active_sidebar( 'home-optin' ) to this line

    function agency_home_genesis_meta() {

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

    and also this line

    function agency_home_loop_helper() {

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

    I have tried doing this but I end up with the widget at the top of the page any help would be appreciated.

    Ron


    Full Time Online Marketer and website creation.

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