This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Reply To: Adding a Widget to Header Right

Jason Bobich

When I look at the hooks map header_addon is to the right of header_logo – is there additional code I would add to tell the theme how big each of those areas is?

When you use the hook you’re just putting the HTML markup where it needs to be. Now, as I said in the original response, you need to position it. So with CSS, you’d float it to the right or position it absolute to the right of the header div, however you want to do it.

#branding .widget-area { float: right; }
#branding .widget-area { position: absolute; top: 0; right: 0; }

[edit] I see you figured this out already!

… when I look at it with Firebug the div seems to have a generic name “widget area” rather than a specific one – which makes styling complicated.

It’s not complicated. Just pick a unique selector around it like:

.header-above .widget-area { ... }

Or if you want a div around it with some unique class, it’s your function; so do that if you want.

function my_header_before() {
	echo '
'; themeblvd_display_sidebar( 'my_header_before_widget_area' ); echo '
'; }