• 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

Custom Widget Area for Home page – 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 › Custom Widget Area for Home page – Agency Theme

This topic is: not resolved

Tagged: Agency Theme, custom widget

  • This topic has 1 reply, 2 voices, and was last updated 12 years, 8 months ago by Brad Dalton.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • April 12, 2013 at 8:43 pm #35143
    Greg W
    Member

    Hi Everyone

    I am trying to work out the right way to add a custom widget to my home page for the Agency theme. I want to be able to put in a regular content area that sits  in between the 3 home widgets and above the footer widgets.

    I have already registered my new widget. I tried using hooks but I need to get in between the home widgets and the footer widget areas.

    My regsiter code:
    genesis_register_sidebar( array(
    'id' => 'home-featured-content',
    'name' => __( 'Home Featured Content', 'agency' ),
    'description' => __( 'This is the home featured content section.', 'agency' ),
    ) );
    I tried putting my code for the widget inside function agency_home_loop_helper() and it works but I am not sure if this is the best way to do this.

    Here is where I put my 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 -->';

    }

    // ------------------------------------ code for my custom widget to show here
    if ( is_active_sidebar( 'home-featured-content' ) ) {
    echo '<div id="home-featured-content">';
    dynamic_sidebar( 'home-featured-content' );
    echo '</div><!-- end .home-featured -->';
    }

    }

    Should I add a new structural wrap? If I do, how would I target this in my home.php file? The examples I have tried so far only allow for 'before' or 'after' or putting it in to an existing function.

    Any help would be appreciated.

    Thanks.

    April 12, 2013 at 10:46 pm #35181
    Brad Dalton
    Participant

    You can add it to a custom function in your child theme.

    You'd need to add a conditional tag and use different code. http://codex.wordpress.org/Conditional_Tags

    is_home() or is_front_page()
    

    Here's some sample code:

    You can change the hook location. Here's visual reference of where the hooks output your widget content http://genesistutorials.com/visual-hook-guide/

    More code for custom widgets and Genesis child theme customization https://gist.github.com/5351168


    Tutorials for StudioPress Themes.

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