Website Vidya
DevelopmentStep-by-Step Guide

How to Add Widget Area Below Header in Genesis Child Theme

Have you ever wanted to add widget area below header in Genesis child theme? I was reading some article on the Forbes website. I loved the fact that how they are utilizing their space below primary navigation on their website for advertisem...

RR
Website Vidya TeamLead Systems Educator
Published:
3 min read
How to Add Widget Area Below Header in Genesis Child Theme
AI Executive SummaryCORE CIS AI

3 min read

Have you ever wanted to add widget area below header in Genesis child theme? I was reading some article on the Forbes website. I loved the fact that how they are utilizing their space below primary navigation on their website for advertisem...

Key Highlights
  • Steps to Add Widget Area Below Header in Genesis Child Theme
Grounded in full engineering runbookCORE CIS Ai Engine

Have you ever wanted to add widget area below header in Genesis child theme?

I was reading some article on the Forbes website. I loved the fact that how they are utilizing their space below primary navigation on their website for advertisements. I went through a couple of articles and resources online to achieve the same on my couple of other websites.

If you are looking for the same feature, this tutorial is for you. You can add an additional widget area below header in Genesis and use it for multiple purposes. The best part is that you don’t even have to change the theme of your website.

To see the live example of this widget area, you can navigate to Search Engine Bay and Sharestrap.

Widget Area Below Header Appearance

Widget Area Below Header in Genesis Child Theme

This widget is perfect for selling ad space or Google AdSense. You can also use this widget section to showcase affiliate offers, and newsletter signup forms etc.

Steps to Add Widget Area Below Header in Genesis Child Theme

Step #1: Register Widget in Child Theme

Edit the functions.php file your Genesis child theme using your favourite editor. You can also use the WordPress dashboard and navigate to Appearance  Editor  function.php.

Now copy and paste the code below at the bottom of the functions.php file.

Step #2: Define the Location of Widget

Once you register a widget, you need to define a widget location where the widget to be shown.

In our case, we are going to display the widget area below header in Genesis child theme. So we will add an action genesis_before_content_sidebar_wrap.

All you need is to copy and paste the code below just after the previous code snippet that you used to register the widget.

Scenario 1: Display Widget only on the Single Post

If you just want to display the widget area on the single post, use the code below:

Scenario 2: Display Widget only on the Homepage

If you want to display the widget area only on the homepage, use the code below:

Step #3: Styling Widget

For styling, add the CSS code below into your style.css file.

.widget-area {
background-color: grey;
margin: 5px 0 10px;
padding: 10px;
overflow: hidden;
}

You can use the browser’s developer tool option to inspect and customize the look and feel of your custom widget section using Cascading Stylesheet (CSS).

Now hit save.

And navigate to the widget section of your website (Appearance Âť Widget), you will see a new custom widget section.

Custom Widget Area

Now just add your ad code or any available widget to see the result.

Add Short Codes In The Side Bar

Typically, in some Genesis child themes, you can’t post shortcode in the widget section. If you’re facing the same issue just copy and paste the below code at the bottom of your functions.php file.

// Use shortcodes in text widgets.
add_filter( 'widget_text', 'do_shortcode' );

What To Read Next

I hope you’ll find this tutorial useful. If you have any question or concern put it in the comment section below.

Written by

Website Vidya Team

Technology educator and researcher at Website Vidya.

Discussion

0
Share your thoughts, ask a question, or suggest a tip...
Write →

No comments on this guide yet. Be the first to share your thoughts or ask a question!

Recommended Reading10 Guides

Related Technical Guides

Tested runbooks, server administration walkthroughs, and troubleshooting guides

Development•

How to Install Python and Pip on Ubuntu 24.04 LTS

Python is one of the most popular, versatile, and widely-used programming languages today, underpinning everything from web development and automation to data science and artificial intelligence. Pip is Python’s official package manager, al...

RR
Rajesh Rai
Read More
Development•

How to Install Python on Ubuntu 24.04 LTS

Python is one of the most popular programming languages today, widely used in web development, data science, machine learning, automation, and more. Ubuntu 24.04 LTS (Long Term Support) comes with Python pre-installed, but often you might w...

RR
Rajesh Rai
Read More
Development•

How to Convert HTML to PDF in Java: 3 Easy Steps

Converting HTML to PDF is a common requirement in many Java applications, such as generating reports, invoices, or any other printable documents. PDFs are universally accepted and provide a professional look for documents. This article will...

RR
Rajesh Rai
Read More