• Skip to primary navigation
  • Skip to main content
OsomCode

OsomCode

Awesome code tutorials for WordPress and Genesis

  • Subscribe
  • My account
    • Edit profile
    • Favorites
    • Update credit card
  • Login

How to add a new widget area in Genesis Framework

Learn in this tutorial how to create a widget area in any Genesis Framework child theme using code.

Each Genesis theme has its own areas to display widgets.

However, depending on the Genesis child theme and your design strategy, you may need to generate a new widget area to display content.

New area that will appear in the widget section.
New area that will appear in the widget section

Is this the case for you? Then read on:

Snippet to create a new widget zone in Genesis

Add the following fragment at the end of functions.php file:

To see this and another 847 code snippets of this website, login or subscribe here.

Done! You now have a new custom widget area.

In the first code snippet you register the new area. Here you can modify both the name and the description as you see fit.

With the second snippet you place this widget area in the hook you are interested in. Using this example as it is, you place it at the end of the content with the genesis_after_content hook.

However, you can place it (almost) wherever you want; that is to say, in any position for which a hook exists: at the end of a post, in the header, the footer…

Interesting, isn’t it?

Conclusions

If you need a new area to add content to your Genesis child theme, creating a widget area may be the solution you are looking for.

And now you know how to do it easily with Genesis hooks.

Any questions? I read you in the comments.

And if you want to give me any suggestion for future tutorials, leave it in the contact form. Advantages of being a subscriber. 😉

Genesis Framework PHP Widgets

To leave read and make questions about this code, you can login or register.

  • About OsomCode
  • FAQ
  • Contact

Legal Notice · Privacy Policy · Cookie Policy · Terms and conditions
Copyright © 2023

Lost your password?