<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: Back from vacation with a teaser</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Wed, 22 May 2013 21:51:43 +0000</pubDate>

<item>
<title>Chris on "Back from vacation with a teaser"</title>
<link>http://themeshaper.com/forums/topic/back-from-vacation-with-a-teaser#post-5665</link>
<pubDate>Sun, 09 Aug 2009 14:18:02 +0000</pubDate>
<dc:creator>Chris</dc:creator>
<guid isPermaLink="false">5665@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Hi,&#60;/p&#62;
&#60;p&#62;finally I'm back from vacation .. I worked the whole morning to finalize the new functionality that creates a widget area.&#60;/p&#62;
&#60;p&#62;Still need some more time to write the documentation .. so here's a teaser for the major question &#34;How to add a widget area to your header?&#34;:&#60;/p&#62;
&#60;p&#62;The new code for your functions.php:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;// How to add a widgetized area to the header
// running Thematic 0.9.6-alpha-003 with 2c-r-fixed style

// First of all we create the widgetized area called &#38;#39;Header Aside&#38;#39;
function my_widget_areas() {
	thematic_create_widget_area(&#38;#39;Header Aside&#38;#39;, thematic_before_widget(), thematic_after_widget(), thematic_before_title(), thematic_after_title(), &#38;#39;thematic_header&#38;#39;,&#38;#39;thematic_standard_widget_area&#38;#39;, 8);
}
add_action(&#38;#39;init&#38;#39;, &#38;#39;my_widget_areas&#38;#39;);

// Now we need to set $hook to &#38;#39;header-aside&#38;#39; in addition this will change the CSS markup to the ID &#38;#39;header-aside&#38;#39;
// Please note that thematic_process_hook() will remove a trailing &#38;#39;widget_area_&#38;#39; and change &#38;#39;_&#38;#39; to &#38;#39;-&#38;#39;
function my_hook($hook) {
	if ($hook == &#38;#39;thematic-header&#38;#39;) {
		return &#38;#39;header-aside&#38;#39;;
	}
	return $hook;
}
add_filter(&#38;#39;thematic_process_hook&#38;#39;, &#38;#39;my_hook&#38;#39;);

// The rest is the styling part where we add some additional CSS markup.

// First we remove the thematic_brandingopen() .. we&#38;#39;re going to make one addition for this one.
// And we remove thematic_access() .. will be added later unchanged with a priority of 10.
function remove_branding() {
		remove_action(&#38;#39;thematic_header&#38;#39;,&#38;#39;thematic_brandingopen&#38;#39;,1);
		remove_action(&#38;#39;thematic_header&#38;#39;,&#38;#39;thematic_access&#38;#39;,9);
}
add_action(&#38;#39;init&#38;#39;, &#38;#39;remove_branding&#38;#39;);

// We wrap #branding and #header-aside with #header-box
function childtheme_brandingopen() { ?&#38;gt;
	&#38;lt;div id=&#38;quot;header_box&#38;quot;&#38;gt;
    	&#38;lt;div id=&#38;quot;branding&#38;quot;&#38;gt;
&#38;lt;?php }
add_action(&#38;#39;thematic_header&#38;#39;,&#38;#39;childtheme_brandingopen&#38;#39;,1);

// Now we need to close #header-box
function header_box_close() { ?&#38;gt;
	&#38;lt;/div&#38;gt;
&#38;lt;?php }
add_action(&#38;#39;thematic_header&#38;#39;, &#38;#39;header_box_close&#38;#39;, 9);

// And we add the unchanged thematic_access() with the new priority 10
add_action(&#38;#39;thematic_header&#38;#39;,&#38;#39;thematic_access&#38;#39;, 10);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;.. and the changes for the style.css:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;#header_box {
	clear: both;
	margin: 0 auto;
	overflow: hidden;
	position: relative;
	width: 960px;
}

#branding {
  float: left;
  width: 620px;
}

/* Moves the new widgetized area to the right and levels it with #branding */
#header-aside {
  float: right;
  width: 300px;
  padding: 88px 0 44px;
}

/* This will clear the floats and keeps the access bottom line
from jumping into the air */
#access {
  clear: both;
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Don't try this with your current version of Thematic or a current SVN copy .. stay tuned for the announcement ;)&#60;/p&#62;
&#60;p&#62;Chris
&#60;/p&#62;</description>
</item>

</channel>
</rss>
