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.
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:
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?
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. 😉