• 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

Add new widget area under menu

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 › Add new widget area under menu

This topic is: resolved

Tagged: Add Widget

  • This topic has 10 replies, 4 voices, and was last updated 10 years, 11 months ago by ToniLaird.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • May 29, 2014 at 11:27 pm #107417
    ToniLaird
    Member

    I am using the Metro Pro and was wondering if anyone could point me in the right direction to add a new widget area just under the main menu.

    I'm sure there must be a link in here somewhere 😉

    http://www.tonipress.com/
    May 29, 2014 at 11:50 pm #107421
    Brad Dalton
    Participant

    Adding New Widget Areas In StudioPress Themes

    Use the genesis_after_header hook and remove the conditional tag of needed.


    Tutorials for StudioPress Themes.

    May 29, 2014 at 11:52 pm #107422
    Davinder Singh Kainth
    Member

    Backup before making changes.

    Adds new widget under header / menu area and is visible on all pages

    /** Add new widget under header on homepage in Genesis theme */
    genesis_register_sidebar( array(
        'id'                => 'homepage-feature',
        'name'          => __( 'Homepage Feature', 'custom' ),
        'description'   => __( 'This is Homepage feature section', 'custom' ),
    ) );
     
    /** Top Homepage feature section */
    add_action( 'genesis_after_header', 'news_homepage_feature', 16 ); 
    function news_homepage_feature() {
          echo '<div class="homepage-feature">';
        dynamic_sidebar( 'homepage-feature' );
        echo '</div><!-- end .homepage-feature -->';
    }

    Refer - http://www.basicwp.com/add-new-widget-genesis-homepage/

    Above tutorial adds new widget only on homepage.


    Sunshine PRO genesis theme
    Need Genesis help? Davinder @ iGuiding Media | My Blog | Fresh Genesis Themes

    May 30, 2014 at 12:02 am #107423
    JanHoek
    Participant

    Did not refresh my browser before I posted a answer. You Already got some help I see. Sorry.


    Hi, my name is Jan Hoek. Sure, they all say I have a big head, but I like to think it’s way too small for all my ideas.

    May 30, 2014 at 1:43 am #107439
    ToniLaird
    Member

    Thanks everyone for your great support. I see different options here and don't know which I should use. To be honest I'd like to add the extra widget space on the homepage only which is a static page.

    May 30, 2014 at 3:22 am #107444
    ToniLaird
    Member

    Both options work but the code from Brad gives my the image on the static home page only. Thank you both again. Perhaps one last question:

    I placed an image in this widget which is flush with the menu. I'd like to add some space. What should I place in the style css?

    Thanks again

    May 30, 2014 at 4:59 am #107450
    Brad Dalton
    Participant

    Use Firebug to find the class and add some padding to the image class or some margin to the widget class.


    Tutorials for StudioPress Themes.

    May 30, 2014 at 10:44 pm #107578
    ToniLaird
    Member

    Thanks Brad

    This is what I added although changing the colour to white appears the padding is already there and looks as I wanted. By the way, I subscribed to your sites.

    .home-feature {
    background:#fff;
    margin:0 auto;
    position: relative
    }

    Regards

    Toni

    May 31, 2014 at 1:37 am #107593
    Brad Dalton
    Participant

    Thanks for sharing your code Toni.


    Tutorials for StudioPress Themes.

    June 20, 2014 at 6:50 am #107449
    Brad Dalton
    Participant

    Use a Dev tool to find the class and add some padding to the image class or some margin to the widget class.


    Tutorials for StudioPress Themes.

    June 29, 2014 at 9:58 am #111977
    ToniLaird
    Member

    Perhaps I closed this post too soon! I added the same code to my live site and the widget shows up in the admin widgets section but nothing displays on the front page. Any ideas?

    http://tonilaird.com/

    genesis_register_sidebar( array(
    'id' => 'home-feature',
    'name' => __( 'Home Feature', 'domain' ),
    'description' => __( 'Add Content Here', 'domain' ),
    ) );

    add_action( 'genesis_after_header', 'home-feature' );

    function your_widget() {

    if ( is_front_page() && is_active_sidebar('home-feature') ) {

    genesis_widget_area( 'home-feature', array(

    'before' => '<div class="home-feature home-feature">',

    'after' => '</div>',

    ) );

    }

    }

  • Author
    Posts
Viewing 11 posts - 1 through 11 (of 11 total)
  • The topic ‘Add new widget area under menu’ 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

© 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