<?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</title>
	<atom:link href="http://banhawi.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://banhawi.com</link>
	<description>Web Design and Development News and Tutorials</description>
	<lastBuildDate>Sat, 07 Jan 2012 03:52:20 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>[Tip] Check if category has children</title>
		<link>http://banhawi.com/2011/09/tip-check-if-category-has-children/</link>
		<comments>http://banhawi.com/2011/09/tip-check-if-category-has-children/#comments</comments>
		<pubDate>Mon, 05 Sep 2011 06:21:54 +0000</pubDate>
		<dc:creator>Banhawi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://banhawi.com/?p=239</guid>
		<description><![CDATA[If you looking forward checking if a certain category has children or not , simply do this don&#8217;t forget replacing $cat_id with the category id you want to check .]]></description>
			<content:encoded><![CDATA[<p>If you looking forward checking if a certain category has children or not , simply do this</p>
<pre class="brush: php; title: ; notranslate">
	$categories = get_categories( &quot;parent=$cat_id&amp;hide_empty=0&quot; );
	if(empty($categories)) {
		// what if has no children
	} else {
		// what if has children
	}
</pre>
<p>don&#8217;t forget replacing $cat_id with the category id you want to check .</p>
]]></content:encoded>
			<wfw:commentRss>http://banhawi.com/2011/09/tip-check-if-category-has-children/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Quick Tip] target=&#8221;_blank&#8221; fix for xHTML1.0 strict</title>
		<link>http://banhawi.com/2011/09/quick-tip-target_blank-fix-for-xhtml1-0-strict/</link>
		<comments>http://banhawi.com/2011/09/quick-tip-target_blank-fix-for-xhtml1-0-strict/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 00:13:51 +0000</pubDate>
		<dc:creator>Banhawi</dc:creator>
				<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://banhawi.com/?p=234</guid>
		<description><![CDATA[Maybe you faced this or you may face the problem of using target = &#8220;_blank&#8221; while working with xHtml1.0 strict doctype as the W3 validator won&#8217;t validate because target = &#8220;_blank&#8221; is not support .. so replace target = &#8220;_blank&#8221; with this javascript code]]></description>
			<content:encoded><![CDATA[<p>Maybe you faced this or you may face the problem of using <span style="text-decoration: underline;">target = &#8220;_blank&#8221;</span> while working with xHtml1.0 strict doctype as the W3 validator won&#8217;t validate because <span style="text-decoration: underline;">target = &#8220;_blank&#8221;</span> is not support .. so replace target = &#8220;_blank&#8221; with this javascript code</p>
<pre class="brush: jscript; title: ; notranslate">onclick=&quot;return ! window.open(this.href);&quot;
</pre>
]]></content:encoded>
			<wfw:commentRss>http://banhawi.com/2011/09/quick-tip-target_blank-fix-for-xhtml1-0-strict/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[Custom Function] Get Posts by Author ID</title>
		<link>http://banhawi.com/2011/06/custom-function-get-posts-by-author-id/</link>
		<comments>http://banhawi.com/2011/06/custom-function-get-posts-by-author-id/#comments</comments>
		<pubDate>Wed, 08 Jun 2011 23:13:19 +0000</pubDate>
		<dc:creator>Banhawi</dc:creator>
				<category><![CDATA[Wordpress]]></category>
		<category><![CDATA[author functions]]></category>
		<category><![CDATA[custom wordpress function]]></category>
		<category><![CDATA[get author posts]]></category>
		<category><![CDATA[get posts by author id]]></category>

		<guid isPermaLink="false">http://banhawi.com/?p=226</guid>
		<description><![CDATA[If you are trying to get posts for a certain author/user , unfortunately there is no function offered by wordpress to do this so i wrote this function to help you do this this function takes two parameters $id which is author id $num which is number of posts you want to query and it [...]]]></description>
			<content:encoded><![CDATA[<p>If you are trying to get posts for a certain author/user , unfortunately there is no function offered by wordpress to do this so i wrote this function to help you do this<br />
<span id="more-226"></span></p>
<pre class="brush: php; title: ; notranslate">
function get_posts_by_author($id,$num) {
	global $wpdb;
	$posts = $wpdb-&gt;get_results(&quot;SELECT * from $wpdb-&gt;posts WHERE post_type = 'post' AND post_status = 'publish' AND post_author = $id LIMIT 0,$num&quot;, ARRAY_A);
	return $posts;
}
</pre>
<p>this function takes two parameters<br />
$id which is author id<br />
$num which is number of posts you want to query </p>
<p>and it returns your posts in an array , so for example if you want to get the title of the first returned post you have to write this </p>
<pre class="brush: php; title: ; notranslate">
$posts[0]['post_title']
</pre>
]]></content:encoded>
			<wfw:commentRss>http://banhawi.com/2011/06/custom-function-get-posts-by-author-id/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Egypt Protests Map by GOOGLE</title>
		<link>http://banhawi.com/2011/02/egypt-protests-map-by-google/</link>
		<comments>http://banhawi.com/2011/02/egypt-protests-map-by-google/#comments</comments>
		<pubDate>Wed, 09 Feb 2011 03:02:18 +0000</pubDate>
		<dc:creator>Banhawi</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Egypt]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Google Maps]]></category>
		<category><![CDATA[Maps]]></category>
		<category><![CDATA[Uprising]]></category>

		<guid isPermaLink="false">http://banhawi.com/?p=208</guid>
		<description><![CDATA[the map contains a map for protests all around egypt with a focus on tahrir square , egypt hospitals , blood donations center and more .]]></description>
			<content:encoded><![CDATA[<div style="margin-right:15px;">
<div id="attachment_207" class="wp-caption alignright" style="width: 310px"><a href="http://banhawi.com/wp-content/uploads/2011/02/gmap.jpg" style="margin: 0 0 10px 15px;"><img class="size-medium wp-image-207 " title="Egypt Protests Map" src="http://banhawi.com/wp-content/uploads/2011/02/gmap-300x151.jpg" alt="Egypt Protests Map" width="300" height="151" /></a><p class="wp-caption-text">Egypt Protests Map</p></div>
</div>
<p>the map contains a map for protests all around egypt with a focus on tahrir square , egypt hospitals , blood donations center and more .</p>
<div style="clear:both;"></div>
]]></content:encoded>
			<wfw:commentRss>http://banhawi.com/2011/02/egypt-protests-map-by-google/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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 [...]]]></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; title: ; notranslate">register_nav_menus( array( $location =&gt; $description ) ); </pre>
<p><strong>Real Example</strong></p>
<pre class="brush: php; title: ; notranslate">
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; title: ; notranslate">
&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>
	</channel>
</rss>

