<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Banhawi &#187; Wordpress</title>
	<atom:link href="http://banhawi.com/category/wordpress/feed/" rel="self" type="application/rss+xml" />
	<link>http://banhawi.com</link>
	<description>Web Design and Development News and Tutorials</description>
	<lastBuildDate>Thu, 29 Jul 2010 00:50:25 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Support WP3.0 Custom Menus</title>
		<link>http://banhawi.com/2010/07/support-wp3-0-custom-menus/</link>
		<comments>http://banhawi.com/2010/07/support-wp3-0-custom-menus/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 00:42:24 +0000</pubDate>
		<dc:creator>Banhawi</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[custom menus]]></category>
		<category><![CDATA[tip]]></category>
		<category><![CDATA[Tutorial]]></category>
		<category><![CDATA[wordpress 3]]></category>

		<guid isPermaLink="false">http://banhawi.com/?p=193</guid>
		<description><![CDATA[
The new wordpress 3.0 custom menus feature is one of the best newly added features to wordpress that gives you more control on your menus every where on your web site .
Wordpress new custom menus works in simple two steps .

First : Register the menu
register your menus in your theme&#8217;s functions.php file
register_nav_menus( array( $location =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p><img class="size-thumbnail wp-image-196 alignright" title="wordpress 3.0 custom menus" src="http://banhawi.com/wp-content/uploads/2010/07/custom-menu-150x150.png" alt="wordpress 3.0 custom menus" width="150" height="150" /><br />
The new wordpress 3.0 custom menus feature is one of the best newly added features to wordpress that gives you more control on your menus every where on your web site .<br />
Wordpress new custom menus works in simple two steps .</p>
<p><span id="more-193"></span></p>
<h3>First : Register the menu</h3>
<p>register your menus in your theme&#8217;s functions.php file</p>
<pre class="brush: php;">register_nav_menus( array( $location =&gt; $description ) ); </pre>
<p><strong>Real Example</strong></p>
<pre class="brush: php;">
if ( function_exists( 'register_nav_menu' ) ) {
register_nav_menu( 'topnav', 'Top Navigation' );
}
</pre>
<p>you can register as many custom menus as you want .</p>
<h3>Second : Place the menu</h3>
<p>Now it&#8217;s time to place your menus where you want it to be showed on your theme</p>
<pre class="brush: php;">
&lt;?php wp_nav_menu(); ?&gt;
</pre>
<p>That&#8217;s it , now just play with your wordpress menu designer and have fun <img src='http://banhawi.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> <br/><br />
<strong>Functions Used : </strong><a href="http://codex.wordpress.org/Function_Reference/register_nav_menu" target="_blank">register_nav_menus</a> &amp;  <a href="http://codex.wordpress.org/Function_Reference/wp_nav_menu" target="_blank">wp_nav_menu</a></p>
]]></content:encoded>
			<wfw:commentRss>http://banhawi.com/2010/07/support-wp3-0-custom-menus/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress 3.0 is Awesome</title>
		<link>http://banhawi.com/2010/06/wordpress-3-0-is-awesome/</link>
		<comments>http://banhawi.com/2010/06/wordpress-3-0-is-awesome/#comments</comments>
		<pubDate>Sat, 19 Jun 2010 15:51:58 +0000</pubDate>
		<dc:creator>Banhawi</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[wordpress 3.0]]></category>

		<guid isPermaLink="false">http://banhawi.com/?p=187</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><embed src="http://v.wordpress.com/wp-content/plugins/video/flvplayer.swf?ver=1.21" type="application/x-shockwave-flash" width="565" height="350" wmode="transparent" seamlesstabbing="true" allowfullscreen="true" allowscriptaccess="always" overstretch="true" flashvars="guid=BQtfIEY1&amp;width=565&amp;height=350&amp;locksize=no&amp;dynamicseek=false&amp;qc_publisherId=p-18-mFEk4J448M" title="Introducing WordPress 3.0 &quot;Thelonious&quot;"></embed></p>
]]></content:encoded>
			<wfw:commentRss>http://banhawi.com/2010/06/wordpress-3-0-is-awesome/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[Custom Function] Get Category Link by Name</title>
		<link>http://banhawi.com/2010/02/custom-function-get-category-link-by-name/</link>
		<comments>http://banhawi.com/2010/02/custom-function-get-category-link-by-name/#comments</comments>
		<pubDate>Sat, 27 Feb 2010 00:30:34 +0000</pubDate>
		<dc:creator>Banhawi</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[custom wordpress function]]></category>
		<category><![CDATA[get_cat_ID]]></category>
		<category><![CDATA[get_category_link]]></category>
		<category><![CDATA[get_category_link_byname]]></category>
		<category><![CDATA[wordpress function]]></category>
		<category><![CDATA[wordpress function reference]]></category>
		<category><![CDATA[wordpress tutorial]]></category>

		<guid isPermaLink="false">http://banhawi.com/?p=180</guid>
		<description><![CDATA[I was working on a theme and i faced that problem , i wanted to get dynamically the category link using category names and there&#8217;s no function in wordpress to do that , so i&#8217;ve wrote a simple function that does what i need .
I&#8217;ve used get_cat_ID function to get category id using name , [...]]]></description>
			<content:encoded><![CDATA[<p>I was working on a theme and i faced that problem , i wanted to get dynamically the category link using category names and there&#8217;s no function in wordpress to do that , so i&#8217;ve wrote a simple function that does what i need .<br />
I&#8217;ve used get_cat_ID function to get category id using name , then get_category_link function to get category link using category id , very simple .<br />
<span id="more-180"></span></p>
<pre class="brush: php;">
function get_category_link_byname($name) {
	$id = get_cat_ID($name);
	$link = get_category_link( $id );
	echo $link;
}
</pre>
<p>use this function as follows ,</p>
<pre class="brush: php;">
&lt;?php function get_category_link_byname('categoryname'); ?&gt;
</pre>
<p>and that&#8217;s it , hope you find it useful .</p>
]]></content:encoded>
			<wfw:commentRss>http://banhawi.com/2010/02/custom-function-get-category-link-by-name/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Banhawi&#8217;s Wordpress IDs , Classes &amp; Tags Reference</title>
		<link>http://banhawi.com/2010/02/banhawis-wordpress-ids-classes-tags-referenece/</link>
		<comments>http://banhawi.com/2010/02/banhawis-wordpress-ids-classes-tags-referenece/#comments</comments>
		<pubDate>Sat, 06 Feb 2010 21:33:54 +0000</pubDate>
		<dc:creator>Banhawi</dc:creator>
				<category><![CDATA[Wordpress]]></category>

		<guid isPermaLink="false">http://banhawi.com/?p=172</guid>
		<description><![CDATA[Through my work i always look for a reference containing all the classes i may use within my wordpress work , so i&#8217;ve created that reference for myself and sharing it with you , hoping you find it helpful .


Download
]]></description>
			<content:encoded><![CDATA[<p>Through my work i always look for a reference containing all the classes i may use within my wordpress work , so i&#8217;ve created that reference for myself and sharing it with you , hoping you find it helpful .<br />
<img class="aligncenter size-full wp-image-173" title="Banhawi's Wordpress IDs , Classes &amp; Tags Referenece " src="http://banhawi.com/wp-content/uploads/2010/02/wordpressref.gif" alt="Banhawi's Wordpress IDs , Classes &amp; Tags Referenece " width="552" height="250" /><br />
<span id="more-172"></span><br />
<a href='http://banhawi.com/wp-content/uploads/2010/02/Banhawi-WP-Ref.pdf'>Download</a></p>
]]></content:encoded>
			<wfw:commentRss>http://banhawi.com/2010/02/banhawis-wordpress-ids-classes-tags-referenece/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Wordpress Conditional Tags In Action (Different Sidebars)</title>
		<link>http://banhawi.com/2009/09/wordpress-conditional-tags-in-action-different-sidebars/</link>
		<comments>http://banhawi.com/2009/09/wordpress-conditional-tags-in-action-different-sidebars/#comments</comments>
		<pubDate>Wed, 16 Sep 2009 04:00:35 +0000</pubDate>
		<dc:creator>Banhawi</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[Wordpress Conditional Tags]]></category>

		<guid isPermaLink="false">http://banhawi.com/?p=133</guid>
		<description><![CDATA[Wordpress can be used to create any type of site that&#8217;s because of it&#8217;s powerful functions  which give developers the freedom to play and create , this tutorial is about a simple yet great for CMS sites tip which is creating different sidebars .

Problem #1
When developing sites using wordpress you may need to create different [...]]]></description>
			<content:encoded><![CDATA[<p>Wordpress can be used to create any type of site that&#8217;s because of it&#8217;s powerful functions  which give developers the freedom to play and create , this tutorial is about a simple yet great for CMS sites tip which is creating different sidebars .<br />
<span id="more-133"></span></p>
<h3>Problem #1</h3>
<p>When developing sites using wordpress you may need to create different sidebars maybe just different in content or in style too .</p>
<h3>Solution :</h3>
<p>We will create two sidebars one for home page , one for pages and one for blog<em> (categories , posts , archives &#8230; etc)</em> .</p>
<pre class="brush: php;">
&lt;?php if ( is_front_page() ) {?&gt;
	&lt;div id=&quot;home_sidebar&quot;&gt;
	...sidebar content.....
	&lt;/div&gt;
&lt;?php } /* end home_sidebar */  ?&gt;

&lt;?php if ( is_page() &amp;&amp; !is_front_page() ) {?&gt;
	&lt;div id=&quot;pages_sidebar&quot;&gt;
	...sidebar content.....
	&lt;/div&gt;
&lt;?php } /* end pages_sidebar */ ?&gt;

&lt;?php else {?&gt;
	&lt;div id=&quot;blog_sidebar&quot;&gt;
	...sidebar content.....
	&lt;/div&gt;
&lt;?php } /* end blog_sidebar */ ?&gt;
</pre>
<p>the code above explains itself , we simply created our three sidebars #home_sidebar , #pages_sidebar , #blog_sidebar which will contain different content , we used Wordpress Conditional Tags (  is_front_page() , is_page() ) .</p>
<p><strong>Line 1 : </strong>used is_front_page() tag within an if statement in order to display #home_sidebar content only in the front page<br />
<em><strong>Note :</strong> there&#8217;s a big difference between is_front_page() and is_home() </em></p>
<p><strong>Line 7 : </strong>used  is_page() &#038;&#038; !is_front_page() within an if statement in order to display the #pages_sidebar within all pages and used &#038;&#038; !is_front_page() in order not to show this sidebar within the home page if you using static page as your home page </p>
<p><strong>Line 13 : </strong> If not home page or page the #blog_sidebar will be displayed </p>
<h3>Problem #2</h3>
<p>If you used a premium portfolio or business theme or looking forward developing your own , you&#8217;ll notice that those themes looks like they using two wordpress installations , as you&#8217;ll find in most of these themes Blog and Portfolio , both with different styling , sidebars and sometimes layout</p>
<h3>Solution :</h3>
<p>With the power of conditional tags it&#8217;s not a problem , we just will create two different parent categories </p>
<p>Blog<br />
 > news<br />
 > tips<br />
 > sub category<br />
Portfolio<br />
 > web<br />
 > print</p>
<pre class="brush: php;">
&lt;?php if ( is_category('Blog') &amp;&amp; in_category('Blog')  ) {?&gt;
	&lt;div id=&quot;blog_sidebar&quot;&gt;
	...sidebar content.....
	&lt;/div&gt;
&lt;?php } /* end blog_sidebar */ ?&gt;

&lt;?php if ( is_category('Portfolio') &amp;&amp; in_category('Portfolio')  ) {?&gt;
	&lt;div id=&quot;portfolio_sidebar&quot;&gt;
	...sidebar content.....
	&lt;/div&gt;
&lt;?php } /* end portfolio_sidebar */ ?&gt;
</pre>
<p><strong><br />
Line 1 :</strong> used  is_category(&#8217;Blog&#8217;) &#038;&#038; in_category(&#8217;Blog&#8217;) within if statement to display #blog_sidebar only within category Blog , it&#8217;s sub-categories and post pages within the Blog category and it&#8217;s sub-categories .</p>
<p><strong>Line 1 :</strong> used  is_category(&#8217;Portfolio&#8217;) &#038;&#038; in_category(&#8217;Portfolio&#8217;) within if statement to display #portfolio_sidebar only within category Portfolio , it&#8217;s sub-categories and post pages within the Portfolio category and it&#8217;s sub-categories .</p>
<p>&#8230; solved</p>
]]></content:encoded>
			<wfw:commentRss>http://banhawi.com/2009/09/wordpress-conditional-tags-in-action-different-sidebars/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
