• 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

Created new widget area but not appearing on site

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 › General Discussion › Created new widget area but not appearing on site

This topic is: not resolved

Tagged: add widgets, New Widget Area, widgets

  • This topic has 6 replies, 3 voices, and was last updated 8 years, 8 months ago by Nurdit.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • February 5, 2017 at 3:11 pm #200599
    bill scheider
    Member

    I'm attempting to create a new widget area holding three widgets after the content in my child theme.
    The widgets appear in the dashboard - they've been created - but don't show up on the front end.
    Can someone take a look at the code from my functions file and tell me what I may be doing wrong?

      //* Register widget area after content
    
     genesis_register_sidebar( array(
    'id' => 'after-content1',
    'name' => __( 'After Content 1', 'genesis' ),
    'description' => __( 'Custom Widget Area', 'childtheme' ),
    ) );
    
    genesis_register_sidebar( array(
    'id' => 'after-content2',
    'name' => __( 'After Content 2', 'genesis' ),
    'description' => __( 'Custom Widget Area', 'childtheme' ),
    ) );
    
     genesis_register_sidebar( array(
    'id' => 'after-content3',
    'name' => __( 'After Content 3', 'genesis' ),
    'description' => __( 'Custom Widget Area', 'childtheme' ),
    ) );
    
    add_action( 'genesis_after_content', 'new_genesis_widget_area' );
    function new_genesis_widget_area() {
                    genesis_widget_area( 'genesis_after_content', array(
    		'before' => '<div class=“after-content widget-area">',
    		'after'  => '</div>',
        ) );
    
    }  

    Thanks very much

    http://www.syntonicmicrowave.com/products/synthesizersnew/
    February 5, 2017 at 4:46 pm #200605
    Victor Font
    Moderator

    The hook in which you display a widget area is not a widget area in and of itself. In your code, you've created 3 new widget areas, after-content1, after-content2, and after-content3. In the genesis_widget_area, you are trying to display a widget area named genesis_after_content. If you want to display a new widget area in the after content hook, you need to create 1 widget area.

    genesis_register_sidebar( array(
    'id' => 'after-content',
    'name' => __( 'After Content 1', 'genesis' ),
    'description' => __( 'Custom Widget Area', 'childtheme' ),
    ) );
    
    add_action( 'genesis_after_content', 'new_genesis_widget_area' );
    function new_genesis_widget_area() {
                    genesis_widget_area( 'after-content', array(
            'before' => '<div class=“after-content widget-area">',
            'after'  => '</div>',
        ) );
    }

    Also, change 'childtheme' to the child theme's text domain.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    February 5, 2017 at 8:05 pm #200613
    bill scheider
    Member

    Thank you for your response, Victor.

    I did change my functions.php from my code above to the code you generously provided. However, it hasn't resolved the issue! The widget area is still not being populated.

    change 'childtheme' to the child theme's text domain

    By changing 'childtheme' do you mean to change it to the name I've given my child theme, ie, 'syntonic'? I did that also to no avail.

    The page url again is http://www.syntonicmicrowave.com/products/synthesizersnew/ if that helps at all.

    Thanks again

    February 6, 2017 at 6:52 am #200627
    Victor Font
    Moderator

    Your site is using the Genesis Sample theme. The child text domain is 'genesis-sample'. I tested the code in my local environment using the Genesis Sample theme. The code works fine, but the widget area is hidden behind the content. You need to apply CSS to the after-content widget area before you can see it in it's proper location. Here's the revised code and starter CSS:

    genesis_register_sidebar( array(
    'id' => 'after-content',
    'name' => __( 'After Content', 'genesis' ),
    'description' => __( 'Custom Widget Area', 'genesis-sample' ),
    ) );
    
    add_action( 'genesis_after_content', 'new_genesis_widget_area' );
    function new_genesis_widget_area() {
                    genesis_widget_area( 'after-content', array(
            'before' => '<div class="after-content widget-area">',
            'after'  => '</div>',
        ) );
    }
    .after-content.widget-area {
        clear: both;
    }

    In reviewing this post, I also just noticed that you have a curly quote at the beginning of after-content widget-area. Curly quotes will break PHP every time. You always have to use straight quotes. You editor may be applying curly quotes by default.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 10, 2017 at 10:06 am #202835
    Nurdit
    Member

    Hi Victor,

    I have used your code in your post above (in my child functions.php) and I have getting nothing in the widgets dashboard or showing on my front-page.php (within my child theme called genesis-sample).

    Any help would be great!

    March 10, 2017 at 12:27 pm #202837
    Victor Font
    Moderator

    The code I gave you works. I tested it in my local environment with the Genesis Sample theme. I can't help you after you copy it. Perhaps your text editor converted the characters to html entities as they appear in your first post. The code in your original post would never work.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    March 10, 2017 at 2:52 pm #202849
    Nurdit
    Member

    Disregard, all sorted thanks mate

  • Author
    Posts
Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘General Discussion’ 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