add widget to header area

Latest Reply from Barry Durham at 2015-05-07 17:16:45
Hello,

I recently updated to version 2.4 and purchased a paid version of the theme. I was wondering if there is a way to add a widget the header of the site?

I have the styling for a mailchimp form as a widget which I would like to embed, but not sure the best way to add this to the header.

Any advice will be appreciated - url is www.theactorsprocess.tv
Hello just waiting on a response.
Hi!

Our themes doesn't provide an ability to embed widgets into header section of your website. However, you may edit header.php file located in the directory of the theme to change the structure and design.
Besides, there are several css files: style.css located in the directory of the theme and the others inside /css folder. Inspecting the page you will be able to find the line and the file you have to edit. We don't provide such kind of services.
Hello Vent2Me,

What you're asking for isn't too difficult. The tricky part is making things look right on mobile with the correct css. That's the part I'm working on now.

First, you need to be using a child theme to do this, otherwise as you may already know, with every upgrade after the code change you make, your header.php file will get overwritten and your changes will disappear.

Anyway, here's the fix. Scroll down through your header.php file until you see this line:

<div id='secondarymenu-container'>


After that line, insert your code like this:

<div id='header-banner'>
<a href="http://website.com/" target="_blank"><img src="http://your-website.com/wp-content/uploads/2015/05/name-of-your-file.png" width="468" height="60" alt="" border="0"/></a></div>


Then you have to style it in your integration section where your custom css goes. Insert something like this:

#header-banner {
width: 468px;
height: 60px;
visibility: visible !important;
position: absolute;
margin-top: -10px;
left: 500px;
top: 30%;
}


You are going to have to play with all of the css code until it's like you want it. Mine works great for desktop, but I'm still working on the mobile css and can't offer any help until I get mine right.

Hope that helps you. I know how frustrating it can be to not get the support you need, when you need it.

Leave a reply

Add codeAdd image