• 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

Inserting a new Widget Area

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 › Inserting a new Widget Area

This topic is: resolved

Tagged: submenu, widget

  • This topic has 4 replies, 2 voices, and was last updated 12 years, 3 months ago by Sumu.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • February 18, 2013 at 2:49 pm #21092
    Sumu
    Member

    Hello,

    I apologize if this has been covered before in similar ways - but I still do not get how to implement a widget area in a new div that I managed to place inside an area that I created inside my theme.

    Here are the steps that I have taken (not utilizing the Simple Hooks plugin):
    I need a container just above the content area, next to the sidebar - did that by creating a top-content-bar.php with the related div inside.

    Added to the functions.php:

    // Top content Bar

    add_action('genesis_before_content', 'include_top_content_bar');
    function include_top_content_bar() {
    require(CHILD_DIR.'/top-content-bar.php');
    }

    So far so good.

    Now the (for me) difficult part:

    How do I make this container usable for a widget, or even the  submenu?

    Thanks!

     

     

    February 18, 2013 at 3:14 pm #21097
    Brad Dalton
    Participant

    You could have registered a widget area and hooked it in using the genesis_before_content hook.

    You only missed registering the widget.

    Here's some sample code you can modify:

    /** Register widget area */
    genesis_register_sidebar( array(
    	'id'				=> 'top-content-bar',
    	'name'			=> __( 'Top Content Bar', 'child' ),
    	'description'	=> __( 'This is the Top Content Bar section.', 'child' ),
    ) );
    

    Here's a good tutorial you may want to test using the conditional tag you want and the genesis hook.

    How to Add a Widgeted Area (a.k.a. Sidebar)

    Then you can drag in the custom menu widget.


    Tutorials for StudioPress Themes.

    February 18, 2013 at 3:44 pm #21101
    Sumu
    Member

    Hi Brad,

    thanks for posting, but it does not work - the area shows up in the control pane, widget is saved in it, but a now-show in the area.

    I am trying to understand what the id relates to - it does not seem to be the div in which I want the widget to be in. In my top-content-bar.php there is the following code:

    <code><?php

    ?><div id="top-content">

    </div>
    <?php

    ?></code>

    Thanks for your help!

     

     

     

    February 18, 2013 at 10:31 pm #21197
    Brad Dalton
    Participant

    The way you have setup the widget is not the normal way it is done.

    I suggest you follow the link to the tutorial and test it on a test site first.

    The code above is sample code but you need to follow Nicks tutorial to get it working.


    Tutorials for StudioPress Themes.

    February 19, 2013 at 2:08 pm #21433
    Sumu
    Member

    Thanks Brad,

    restarted fresh according to the tutorial. It works now.

    Thanks again!

     

     

     

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