• 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

How to call a registered widget area using simple hooks

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 › How to call a registered widget area using simple hooks

This topic is: not resolved

Tagged: widget area

  • This topic has 2 replies, 2 voices, and was last updated 11 years, 4 months ago by zamanwaz.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • March 20, 2015 at 2:30 am #145001
    zamanwaz
    Member

    Hi there,

    I have checked the official genesis tutorials for registering widget areas here:

    http://my.studiopress.com/tutorials/register-widget-area/

    The widget is registered fine. But the problem I am facing is to call the widget area. I tried the first technique which mentions to call the widget area by placing the code

    genesis_widget_area( 'widget-name', array( 'before' => '<div class="div-class-name widget-area">', 'after' => '</div>',

    in a template file. I used simple hooks instead of a template file. And it is showing

    Parse error: syntax error, unexpected ';'

    Finally I also tried the last way but it did not work too. The only way which worked was by using this in simple hooks:

    <?php dynamic_sidebar( ‘widget-name’ ); ?>

    But in this case, I cannot use div and I need to use div for some styling through CSS. So, could anyone please help on how to call a newly created widget area from inside simple hooks or from the functions.php where I can use the div tag.

    March 20, 2015 at 8:53 am #145027
    Brad Dalton
    Participant

    Wrap the 1st snippet in PHP tags.

    Looks like you're missing some code as well.


    Tutorials for StudioPress Themes.

    March 20, 2015 at 10:32 am #145042
    zamanwaz
    Member

    I am not at all good at php. But this was just the example. I had used the code

    <?php genesis_widget_area( 'widget-name', array( 'before' => '<div class="div-class-name widget-area">', 'after' => '</div>', ?>

    The code was directly copied from the Genesis tutorials in the register widget area tutorial inside my Studiopress account. So, not sure how I am missing code.

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

© 2026 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