<?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>Ehsanul Haque</title>
	<atom:link href="http://ehsanis.me/feed/" rel="self" type="application/rss+xml" />
	<link>http://ehsanis.me</link>
	<description>Welcome to My Personal Site &#38; Blog</description>
	<lastBuildDate>Wed, 21 Dec 2011 12:55:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Grab Yahoo demo page has been removed, thanks to Yahoo!</title>
		<link>http://ehsanis.me/2011/12/12/grab-yahoo-demo-page-has-been-removed-thanks-to-yahoo/</link>
		<comments>http://ehsanis.me/2011/12/12/grab-yahoo-demo-page-has-been-removed-thanks-to-yahoo/#comments</comments>
		<pubDate>Mon, 12 Dec 2011 13:48:03 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[Codes]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Recent News]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[Bluehost]]></category>
		<category><![CDATA[case]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[FYI]]></category>
		<category><![CDATA[Grab]]></category>
		<category><![CDATA[Grab Yahoo]]></category>
		<category><![CDATA[Login]]></category>
		<category><![CDATA[page]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[reason]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[service]]></category>
		<category><![CDATA[site]]></category>
		<category><![CDATA[while]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://ehsanis.me/?p=538</guid>
		<description><![CDATA[In case if you are coming to my blog to find out why Grab Yahoo demo is not available anymore &#8211; here is why. Few weeks ago I found that my hosting service has been terminated by Bluehost &#8211; reason &#8230; <a href="http://ehsanis.me/2011/12/12/grab-yahoo-demo-page-has-been-removed-thanks-to-yahoo/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>In case if you are coming to my blog to find out why Grab Yahoo demo is not available anymore &#8211; here is why. Few weeks ago I found that my hosting service has been terminated by Bluehost &#8211; reason given was that one of my domains is acting as a phishing site.</p>
<p>When I called up Bluehost they referred me to my Grab Yahoo demo page &#8211; which is broken for a while now. Apparently Yahoo! complained to bluehost that the demo page for Grab Yahoo is a phishing site. Well, FYI Yahoo!, this PHP script that I wrote a long long time ago uses PHP&#8217;s cURL library to authenticate users and then allow them to put their contacts in an array. Since you (Yahoo!) have been constantly changing your login forms, added captcha etc the class (Grab Yahoo) had to be modified to keep working &#8211; which I stopped doing for a while. Due to the fact that it stopped working &#8211; when authentication failed it took users to Yahoo! login page &#8211; as I had follow redirection turned on for debugging at one stage. Anyhow, if you want to validate you can always download the PHP file from phpclasses.org &#8211; just look for Grab Yahoo.</p>
]]></content:encoded>
			<wfw:commentRss>http://ehsanis.me/2011/12/12/grab-yahoo-demo-page-has-been-removed-thanks-to-yahoo/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Import Contacts from iPhone to an Android Phone</title>
		<link>http://ehsanis.me/2011/10/17/how-to-import-contacts-from-iphone-to-an-android-phone/</link>
		<comments>http://ehsanis.me/2011/10/17/how-to-import-contacts-from-iphone-to-an-android-phone/#comments</comments>
		<pubDate>Mon, 17 Oct 2011 17:29:47 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[Android]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[HTC Evo 3D]]></category>
		<category><![CDATA[Interest]]></category>
		<category><![CDATA[iPhone]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[import contact]]></category>
		<category><![CDATA[import from iPhone to Android HTC EVO 3D]]></category>
		<category><![CDATA[iPhone contact]]></category>

		<guid isPermaLink="false">http://ehsanis.me/?p=535</guid>
		<description><![CDATA[Recently I&#8217;ve switched from iPhone to Android device, HTC Evo 3D, and first thing I wanted to do (like anyone switching their handset will) to import my contacts. But to my surprise I found that iPhone stored all the contacts &#8230; <a href="http://ehsanis.me/2011/10/17/how-to-import-contacts-from-iphone-to-an-android-phone/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve switched from iPhone to Android device, HTC Evo 3D, and first thing I wanted to do (like anyone switching their handset will) to import my contacts. But to my surprise I found that iPhone stored all the contacts on the phone and there&#8217;s no way to copy/import the contact to SIM!</p>
<p>So, I decided to start adding the contacts one by one (manually) on my new phone and while doing it I realised that my Android phone has 3 options of storing the contacts &#8211; on the phone, on the SIM and on my Google account. So, I quickly started iTunes on the computer I used to sync my iPhone with. After connecting my iPhone I checked how the contacts are synced between iPhone and iTunes.</p>
<p>iTunes&#8217; &#8220;Info&#8221; tab for the iPhone has option to sync contacts. It has options to sync contacts with Outlook, Windows Contacts, Yahoo Address Book and Google account. And that was my answer and solution for the problem. I selected Google Account, logged into it and synced. As soon as the sync was done I had all my contacts on my HTC phone. Awesomeness!</p>
]]></content:encoded>
			<wfw:commentRss>http://ehsanis.me/2011/10/17/how-to-import-contacts-from-iphone-to-an-android-phone/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress: Digging into Missed Schedule Problem – Part 2</title>
		<link>http://ehsanis.me/2011/08/24/wordpress-digging-into-missed-schedule-problem-%e2%80%93-part-2/</link>
		<comments>http://ehsanis.me/2011/08/24/wordpress-digging-into-missed-schedule-problem-%e2%80%93-part-2/#comments</comments>
		<pubDate>Wed, 24 Aug 2011 17:20:51 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[Codes]]></category>
		<category><![CDATA[Interest]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[Digging]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[Missed]]></category>
		<category><![CDATA[Missed Schedule]]></category>
		<category><![CDATA[Part]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[publish_future_post]]></category>
		<category><![CDATA[Schedule]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timestamp]]></category>
		<category><![CDATA[wordpress missed schedule]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[wp missed schedule]]></category>
		<category><![CDATA[_get_cron_array]]></category>

		<guid isPermaLink="false">http://ehsan.bdwebwork.com/?p=512</guid>
		<description><![CDATA[OK &#8230; since my last post on the WP&#8217;s missed schedule issue I&#8217;ve gone many directions and thought I found the root cause of the issue. Although I&#8217;ve not yet found the exact problem but I do have a solid &#8230; <a href="http://ehsanis.me/2011/08/24/wordpress-digging-into-missed-schedule-problem-%e2%80%93-part-2/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>OK &#8230; since my last <a title="Wordpress: Digging into Missed Schedule Problem - Part 1" href="http://wp.me/pfBsW-88" target="_blank">post </a>on the WP&#8217;s missed schedule issue I&#8217;ve gone many directions and thought I found the root cause of the issue. Although I&#8217;ve not yet found the exact problem but I do have a solid candidate for the problem.</p>
<p>Like I mentioned in the <a title="Wordpress: Digging into Missed Schedule Problem - Part 1" href="http://wp.me/pfBsW-88" target="_blank">Part 1</a> of this series WP picks the second portion for the scheduled time on its own and initially I thought that is the issue. So, according to my finding what WP does is the take the second bit from the time the request was made to save the article and uses that. So I thought if two posts are scheduled for the same hour, may be the time SCHEDULE button was clicked was same causing the conflict of timestamp overlapping while creating the cron array (which is returned by _get_cron_array function).</p>
<p>But that does not tell me why a post that is scheduled for a different hour and the only one to be published at that time is missed once in a while. So, that could NOT be the real reason (but a possibility). So I started looking more into the publishing functionality. After going through a lot of code I wanted to run a quick test. My test relies on the fact that the environment that the WP is running on has multiple authors (sometimes sharing the same user accounts) and probably publishing articles are the same time.</p>
<p>So as part of the test what I did was I&#8217;ve two sessions (as author/admin) running on two windows and set two articles to be scheduled (at the same time or different times). Then I click on SCHEDULE button on two windows at the same time. After repeating the same test several times I found that one of the posts I was scheduling is not updated in the wp_options table for the option_name &#8220;cron&#8221;. Therefore, when the wp-cron runs it only publishes the one that was added and the other one shows up as missed schedule. If the post, that did not get into the cron list, is updated later (i.e. just click on SCHEDULE button again even without modifying anything in the post) it will be added in the list.</p>
<p>So, now I am trying to find any other way this could happen. For the time being I am thinking of an alternate way to make sure the cron list is always up to date.</p>
]]></content:encoded>
			<wfw:commentRss>http://ehsanis.me/2011/08/24/wordpress-digging-into-missed-schedule-problem-%e2%80%93-part-2/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>WordPress: Digging into Missed Schedule Problem &#8211; Part 1</title>
		<link>http://ehsanis.me/2011/08/22/wordpress-digging-into-missed-schedule-problem-part-1/</link>
		<comments>http://ehsanis.me/2011/08/22/wordpress-digging-into-missed-schedule-problem-part-1/#comments</comments>
		<pubDate>Mon, 22 Aug 2011 17:38:27 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[Codes]]></category>
		<category><![CDATA[Interest]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[array]]></category>
		<category><![CDATA[article]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[Digging]]></category>
		<category><![CDATA[issue]]></category>
		<category><![CDATA[list]]></category>
		<category><![CDATA[Missed]]></category>
		<category><![CDATA[Missed Schedule]]></category>
		<category><![CDATA[Part]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[post]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[publish_future_post]]></category>
		<category><![CDATA[Schedule]]></category>
		<category><![CDATA[time]]></category>
		<category><![CDATA[timestamp]]></category>
		<category><![CDATA[wordpress missed schedule]]></category>
		<category><![CDATA[WP]]></category>
		<category><![CDATA[wp missed schedule]]></category>
		<category><![CDATA[_get_cron_array]]></category>

		<guid isPermaLink="false">http://ehsan.bdwebwork.com/?p=504</guid>
		<description><![CDATA[Recently, while working extensively with WordPress, I&#8217;ve come across the problem with WordPress&#8217; Missed Schedule issue. Every now and then post(s) scheduled in a future date does not get published and shows up as &#8220;Missed &#8220;Schedule&#8221; on admin side. Searching &#8230; <a href="http://ehsanis.me/2011/08/22/wordpress-digging-into-missed-schedule-problem-part-1/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently, while working extensively with WordPress, I&#8217;ve come across the problem with WordPress&#8217; Missed Schedule issue. Every now and then post(s) scheduled in a future date does not get published and shows up as &#8220;Missed &#8220;Schedule&#8221; on admin side. Searching on net is not giving me much of a direction than people suggesting to run wp-cron manually etc. So I decided to to dig into the issue and trace the root of the problem. So here is Part 1 of my finding. I am still digging to find real issue and the way to fix it.</p>
<p>So far I&#8217;ve manually ran part of wp-cron to find details. &#8220;wp-cron.php&#8221; makes a query into the wp_options (wp can be different as per the prefix you&#8217;ve used during WordPress installation) table in WordPress database to find the current/future processes to run. So what comes back from the query is an array like:</p>
<pre name="code" class="php">
[1314032200] =&gt; Array (
  [publish_future_post] =&gt; Array (
    [asdasd0880as0dasdasd08] =&gt; Array (
      [schedule] =&gt;
      [args] =&gt; Array (
        [0] =&gt; 19999
      )
    )
  )
)</pre>
<p>Here the key of the array is the unix timestamp when the post should be published. Everything seems fine until I looked at the list of scheduled posts and for one given day I had 4 articles scheduled. But my array from _get_cron_array function only lists 1 post. 3 out of 4 articles were scheduled at the same time (for example, 2PM) so that lead me to think probably all three posts scheduled at 2PM have the same timestamp, therefore, the key is being overlapped. But it seems WP (is smart enough to) set the time at different seconds of the hour it is scheduled for. And that also explains why the 4th article (which was scheduled at a different time) was not showing up in the list.</p>
<p>For example, if I schedule 2 posts at 4PM WP will schedule one at 4:00:22 and one at 4:00:40. I am not sure about the pattern WP uses for the second but one thing I know when I&#8217;m scheduling a future post it only lets me specify hour and the minute. It makes sense because if we have the same timestamp it will only take one item for the timestamp in the array.</p>
<p>Now, like I explained the array is still missing the articles in the cron array although they have different timestamp. So I tried looking more. I let the time span to the next scheduled post and have proven that the article(s) that I do not see in the array (although they are scheduled) got missed. To quickly see what is in the array you can have a test.php in the root of WP installation and try the following code:</p>
<pre name="code" class="php">
require_once('./wp-load.php');
$crons = _get_cron_array();
echo "&lt;PRE&gt;";
print_r($crons);
echo "&lt;/PRE&gt;";</pre>
<p>This will print the list of scheduled posts (if any). So before I dig into the code even further I decided to check the list for the next set of scheduled posts. I found another few those did not show up in the array. So I decided to edit one of the articles that is missing in the cron array. I clicked on EDIT and just pressed the UPDATE button (without modifying anything). Now when I went back to my array (refreshing test.php) I found the article listed in the array!! Now, I&#8217;ve let the cron run for the second round and the articles those were not in the array got missed and the one I manually updated got published.</p>
<p>So, now my next step is to dig into the scheduling functionality of WordPress to understand how does this work and what causes some of the articles getting missed from the scheduled list. I will post my finding soon after I have more on this topic.</p>
]]></content:encoded>
			<wfw:commentRss>http://ehsanis.me/2011/08/22/wordpress-digging-into-missed-schedule-problem-part-1/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>happy mother’s day</title>
		<link>http://ehsanis.me/2011/05/09/happy-mothers-day/</link>
		<comments>http://ehsanis.me/2011/05/09/happy-mothers-day/#comments</comments>
		<pubDate>Tue, 10 May 2011 02:31:35 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Interest]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Playground]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[happy]]></category>
		<category><![CDATA[happy mother's day]]></category>
		<category><![CDATA[mother]]></category>

		<guid isPermaLink="false">http://ehsan.bdwebwork.com/2011/05/09/happy-mothers-day/</guid>
		<description><![CDATA[happy mother&#8217;s day, a photo by Ehsanul Haque on Flickr.]]></description>
			<content:encoded><![CDATA[<div style="margin: 0 0 10px 0; padding: 0; font-size: 0.8em; line-height: 1.6em;"><a href="http://www.flickr.com/photos/ehsanul/5701913322/" title="happy mother's day"><img src="http://farm6.static.flickr.com/5025/5701913322_e292a967d2.jpg" alt="happy mother's day by Ehsanul Haque" /></a><br /><span style="margin: 0;"><a href="http://www.flickr.com/photos/ehsanul/5701913322/">happy mother&#8217;s day</a>, a photo by <a href="http://www.flickr.com/photos/ehsanul/">Ehsanul Haque</a> on Flickr.</span></div></p>
]]></content:encoded>
			<wfw:commentRss>http://ehsanis.me/2011/05/09/happy-mothers-day/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>blue</title>
		<link>http://ehsanis.me/2011/05/09/blue/</link>
		<comments>http://ehsanis.me/2011/05/09/blue/#comments</comments>
		<pubDate>Tue, 10 May 2011 02:30:17 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[Fun]]></category>
		<category><![CDATA[Interest]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Playground]]></category>
		<category><![CDATA[blue]]></category>
		<category><![CDATA[Flickr]]></category>

		<guid isPermaLink="false">http://ehsan.bdwebwork.com/2011/05/09/blue/</guid>
		<description><![CDATA[blue, a photo by Ehsanul Haque on Flickr.]]></description>
			<content:encoded><![CDATA[<div style="margin: 0 0 10px 0; padding: 0; font-size: 0.8em; line-height: 1.6em;"><a href="http://www.flickr.com/photos/ehsanul/5701310859/" title="blue"><img src="http://farm3.static.flickr.com/2649/5701310859_b85b2399fb.jpg" alt="blue by Ehsanul Haque" /></a><br /><span style="margin: 0;"><a href="http://www.flickr.com/photos/ehsanul/5701310859/">blue</a>, a photo by <a href="http://www.flickr.com/photos/ehsanul/">Ehsanul Haque</a> on Flickr.</span></div></p>
]]></content:encoded>
			<wfw:commentRss>http://ehsanis.me/2011/05/09/blue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>spring is here</title>
		<link>http://ehsanis.me/2011/05/09/spring-is-here/</link>
		<comments>http://ehsanis.me/2011/05/09/spring-is-here/#comments</comments>
		<pubDate>Mon, 09 May 2011 21:00:26 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Interest]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[Playground]]></category>
		<category><![CDATA[Flickr]]></category>
		<category><![CDATA[spring]]></category>
		<category><![CDATA[spring is here]]></category>

		<guid isPermaLink="false">http://ehsan.bdwebwork.com/2011/05/09/spring-is-here/</guid>
		<description><![CDATA[spring is here, a photo by Ehsanul Haque on Flickr.]]></description>
			<content:encoded><![CDATA[<div style="margin: 0 0 10px 0; padding: 0; font-size: 0.8em; line-height: 1.6em;"><a title="spring is here" href="http://www.flickr.com/photos/ehsanul/5701900448/"><img src="http://farm3.static.flickr.com/2762/5701900448_0914bfcc17.jpg" alt="spring is here by Ehsanul Haque" /></a><br />
<span style="margin: 0;"><a href="http://www.flickr.com/photos/ehsanul/5701900448/">spring is here</a>, a photo by <a href="http://www.flickr.com/photos/ehsanul/">Ehsanul Haque</a> on Flickr.</span></div>
]]></content:encoded>
			<wfw:commentRss>http://ehsanis.me/2011/05/09/spring-is-here/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BijoyDibosh Smilies</title>
		<link>http://ehsanis.me/2010/12/14/bijoydibosh-smilies/</link>
		<comments>http://ehsanis.me/2010/12/14/bijoydibosh-smilies/#comments</comments>
		<pubDate>Wed, 15 Dec 2010 03:47:50 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[Bangladesh]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Interest]]></category>
		<category><![CDATA[Playground]]></category>
		<category><![CDATA[16 December]]></category>
		<category><![CDATA[Bijoy Dibosh]]></category>
		<category><![CDATA[BijoyDibosh]]></category>
		<category><![CDATA[day]]></category>
		<category><![CDATA[sample]]></category>
		<category><![CDATA[set]]></category>
		<category><![CDATA[Smilies]]></category>
		<category><![CDATA[version]]></category>
		<category><![CDATA[victory]]></category>
		<category><![CDATA[Victory Day]]></category>

		<guid isPermaLink="false">http://ehsan.bdwebwork.com/?p=435</guid>
		<description><![CDATA[I am trying to make a set of smilies to celebrate our Victory Day (িবজয় িদবস). Here is the sample The bigger version]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I am trying to make a set of smilies to celebrate our Victory Day (িবজয় িদবস). Here is the sample <img src='http://ehsanis.me/wp-includes/images/smilies/icon_happy.png' alt=':)' class='wp-smiley' /> </p>
<p style="text-align: left;">The bigger version</p>
<p style="text-align: left;"><a href="http://ehsan.bdwebwork.com/wp-content/uploads/2010/12/icon_happy.jpg" rel="lightbox[435]"><img class="aligncenter size-medium wp-image-440" title="BijoyDibosh Smilies" src="http://ehsan.bdwebwork.com/wp-content/uploads/2010/12/icon_happy-300x257.jpg" alt="BijoyDibosh Smilies" width="300" height="257" /></a></p>
<p style="text-align: center;">
]]></content:encoded>
			<wfw:commentRss>http://ehsanis.me/2010/12/14/bijoydibosh-smilies/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>WordPress wp_nav_menu to Exclude Page(s)</title>
		<link>http://ehsanis.me/2010/11/30/wordpress-wp_nav_menu-to-exclude-pages/</link>
		<comments>http://ehsanis.me/2010/11/30/wordpress-wp_nav_menu-to-exclude-pages/#comments</comments>
		<pubDate>Tue, 30 Nov 2010 04:53:14 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[Codes]]></category>
		<category><![CDATA[Fun]]></category>
		<category><![CDATA[Interest]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[codex]]></category>
		<category><![CDATA[exclude page from top menu]]></category>
		<category><![CDATA[post-tempate]]></category>
		<category><![CDATA[wp_list_pages]]></category>
		<category><![CDATA[wp_nav_menu]]></category>

		<guid isPermaLink="false">http://ehsan.bdwebwork.com/?p=431</guid>
		<description><![CDATA[While working on a project I realised that I need to exclude pages I created from the top menu, which is built by wp_nav_menu function in header.php. I could use Menus under Appearance tab to define a top menu and &#8230; <a href="http://ehsanis.me/2010/11/30/wordpress-wp_nav_menu-to-exclude-pages/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>While working on a project I realised that I need to exclude pages I created from the top menu, which is built by wp_nav_menu function in header.php. I could use Menus under Appearance tab to define a top menu and pass the menu name in the function arguments but I would loose the CSS for the original menu created by wp_nav_menu itself. So I started looking for ways to exclude the pages I don&#8217;t want to show on the top menu. So I kind of added a hack in wp_nav_menu function.</p>
<p>First, I added &#8220;exclude&#8221; in the list of default arguments:</p>
<pre name="code" class="php">
$defaults = array( 'menu' => '', 'container' => 'div', 'container_class' => '', 'container_id' => '', 'menu_class' => 'menu', 'menu_id' => '', 'echo' => true, 'fallback_cb' => 'wp_page_menu', 'before' => '', 'after' => '', 'link_before' => '', 'link_after' => '', 'depth' => 0, 'walker' => '', 'theme_location' => '', 'exclude' => '' );
</pre>
<p>Then I copied couple of lines from wp_list_pages function (in post-template.php) to add the $exclude_array variable:</p>
<pre name="code" class="php">
$exclude_array = ( $args->exclude ) ? explode(',', $args->exclude) : array();
$args->exclude = implode( ',', apply_filters('wp_nav_menu_excludes', $exclude_array) );
</pre>
<p>Note that I had the change $args['exclude'] to $args->exclude. Now in header.php just add the exclude in the argument array:</p>
<pre name="code" class="php">
< ?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary', 'exclude' => '66' ) ); ?>
</pre>
<p>Done! The unwanted pages are gone from the top menu. Booyaaah!</p>
]]></content:encoded>
			<wfw:commentRss>http://ehsanis.me/2010/11/30/wordpress-wp_nav_menu-to-exclude-pages/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Grab Yahoo class revived</title>
		<link>http://ehsanis.me/2010/11/06/grab-yahoo-class-revived/</link>
		<comments>http://ehsanis.me/2010/11/06/grab-yahoo-class-revived/#comments</comments>
		<pubDate>Sat, 06 Nov 2010 21:01:16 +0000</pubDate>
		<dc:creator>Ehsan</dc:creator>
				<category><![CDATA[Codes]]></category>
		<category><![CDATA[Interest]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Tips and Tricks]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[com]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[Grab]]></category>
		<category><![CDATA[org]]></category>
		<category><![CDATA[Ovidiu]]></category>
		<category><![CDATA[PHPClasses]]></category>
		<category><![CDATA[PHPKode]]></category>
		<category><![CDATA[problem]]></category>
		<category><![CDATA[Yahoo]]></category>

		<guid isPermaLink="false">http://ehsan.bdwebwork.com/?p=426</guid>
		<description><![CDATA[Finally after months of waiting I&#8217;ve updated Grab Yahoo class on PHPClasses.org and PHPKode.com. Thanks to Ovidiu who fixed the latest problem. I&#8217;ve tested it and is working as expected. The demo is running http://resource.bdwebwork.com/GrabYahoo/ and latest code can either &#8230; <a href="http://ehsanis.me/2010/11/06/grab-yahoo-class-revived/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Finally after months of waiting I&#8217;ve updated Grab Yahoo class on <a href="http://ehaque.users.phpclasses.org/">PHPClasses.org</a> and <a href="http://www.phpkode.com/">PHPKode.com</a>.</p>
<p>Thanks to Ovidiu who fixed the latest problem. I&#8217;ve tested it and is working as expected. The demo is running http://resource.bdwebwork.com/GrabYahoo/ and latest code can either be downloaded from <a href="http://ehaque.users.phpclasses.org/package/3127-PHP-Grab-the-contact-list-calendar-of-an-Yahoo-user.html">PHPClasses.org</a> or <a href="http://www.phpkode.com/scripts/item/grab-yahoo/">PHPKode.com</a>.</p>
<p>Thanks :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://ehsanis.me/2010/11/06/grab-yahoo-class-revived/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

