• 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

Remove the widget area from Genesis Framework header

Learn how to remove by code the header widget area in Genesis Framework.

By default, Genesis Framework has a space on the right side of the header reserved to include widgets such as menu widgets.

In fact, this is a setting I use very often.

Instead of using the navigation bar at the bottom of the header, I use this space for the menu to gain a few extra pixels for content display.

However, depending on the Genesis child theme and your design strategy, you may not need this widget area.

Is this your case? Then read on:

Code snippet to remove the widget from the header

Add this snippet to the end of functions.php file:

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

Done! The widget area will no longer be available from the administration dashboard.

This is a good way to prevent a client from entering widgets there if the Genesis child theme is not ready for it.

Conclusions

While the widget area in the Genesis header is handy for placing the main menu, there may be projects that you would like to remove.

Now you know how to remove it with a simple line of code.

If you have any question, please leave it in the comments. And if you want to give me a suggestion for future snippets, please send it through the contact form.

Benefits of being a subscriber. 🙂

Genesis Framework Header 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?