Inserting a new Widget Area

Community Forums Forums Design Tips and Tricks Inserting a new Widget Area

This topic is: resolved

Tagged: ,

This topic contains 4 replies, has 2 voices, and was last updated by  Sumu 2 years, 9 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #21092



    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() {

    So far so good.

    Now the (for me) difficult part:

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






    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.

    Then you can drag in the custom menu widget.



    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:


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



    Thanks for your help!






    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.



    Thanks Brad,

    restarted fresh according to the tutorial. It works now.

    Thanks again!




Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.