<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Recent Wordpress Posts in Sidebar</title>
	<atom:link href="http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/</link>
	<description>Life, Internet, Software, Gadgets, Programming and Investments</description>
	<lastBuildDate>Thu, 31 Dec 2009 03:29:06 -0500</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: PeterVk</title>
		<link>http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/comment-page-1/#comment-90456</link>
		<dc:creator>PeterVk</dc:creator>
		<pubDate>Sun, 13 Apr 2008 08:22:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/#comment-90456</guid>
		<description>I know this post is a bit old - but thanks!  Worked perfectly.  Wish I&#039;d found this earlier in the morning...</description>
		<content:encoded><![CDATA[<p>I know this post is a bit old &#8211; but thanks!  Worked perfectly.  Wish I&#8217;d found this earlier in the morning&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uri</title>
		<link>http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/comment-page-1/#comment-977</link>
		<dc:creator>uri</dc:creator>
		<pubDate>Tue, 21 Mar 2006 14:31:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/#comment-977</guid>
		<description>It does! thanks a lot!</description>
		<content:encoded><![CDATA[<p>It does! thanks a lot!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: szehau</title>
		<link>http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/comment-page-1/#comment-975</link>
		<dc:creator>szehau</dc:creator>
		<pubDate>Tue, 21 Mar 2006 13:16:25 +0000</pubDate>
		<guid isPermaLink="false">http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/#comment-975</guid>
		<description>Hi uri,

Let say you have a code does something like this:
&lt;code&gt;
// Call query_posts

query_posts (&quot;whatever&quot;);

if (is_page()) {
    // dispaly A
} else {
    // display B
}
&lt;/code&gt;

Instead of doing that, change to this:
&lt;code&gt;
// Save whatever is_xxx() function

$is_page = is_page();
$is_post = is_post();

// Call query_posts

query_posts (&quot;whatever&quot;);

if ($is_page) {    // the different is here
    // dispaly A
} else {
    // display B
}

if ($is_post) {    // the different is here
    // dispaly C
} else {
    // display D
}
&lt;/code&gt;

Hope this will help :)</description>
		<content:encoded><![CDATA[<p>Hi uri,</p>
<p>Let say you have a code does something like this:<br />
<code><br />
// Call query_posts</p>
<p>query_posts ("whatever");</p>
<p>if (is_page()) {<br />
    // dispaly A<br />
} else {<br />
    // display B<br />
}<br />
</code></p>
<p>Instead of doing that, change to this:<br />
<code><br />
// Save whatever is_xxx() function</p>
<p>$is_page = is_page();<br />
$is_post = is_post();</p>
<p>// Call query_posts</p>
<p>query_posts ("whatever");</p>
<p>if ($is_page) {    // the different is here<br />
    // dispaly A<br />
} else {<br />
    // display B<br />
}</p>
<p>if ($is_post) {    // the different is here<br />
    // dispaly C<br />
} else {<br />
    // display D<br />
}<br />
</code></p>
<p>Hope this will help :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: uri</title>
		<link>http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/comment-page-1/#comment-973</link>
		<dc:creator>uri</dc:creator>
		<pubDate>Tue, 21 Mar 2006 13:02:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/#comment-973</guid>
		<description>Hi,
could you explain your workaround for the is_page() disfunctioning after using EngLee&#039;s method? I&#039;m only a beginner with PHP so I couldn&#039;t understand how to solve it from the explanations you both gave here.
My problem is like that: I have a footer which can be wide (if it is a wide page) or narrow (for narrow page). I used  EngLee&#039;s method in this page:
http://uriashi.com/?page_id=38
(in the left sidebar, you can see I even used the_excerpt_rss() instead of the_title() in order to display the images that I put for each post)
in the footer there&#039;s an conditional if that says something like &quot;if it is page 38 - display the wide footer&quot;, but as you can see, after implementing the query_posts it messed it as you said and the footer displayed is the narrow one.
thanks in advance,
uri</description>
		<content:encoded><![CDATA[<p>Hi,<br />
could you explain your workaround for the is_page() disfunctioning after using EngLee&#8217;s method? I&#8217;m only a beginner with PHP so I couldn&#8217;t understand how to solve it from the explanations you both gave here.<br />
My problem is like that: I have a footer which can be wide (if it is a wide page) or narrow (for narrow page). I used  EngLee&#8217;s method in this page:<br />
<a href="http://uriashi.com/?page_id=38" rel="nofollow">http://uriashi.com/?page_id=38</a><br />
(in the left sidebar, you can see I even used the_excerpt_rss() instead of the_title() in order to display the images that I put for each post)<br />
in the footer there&#8217;s an conditional if that says something like &#8220;if it is page 38 &#8211; display the wide footer&#8221;, but as you can see, after implementing the query_posts it messed it as you said and the footer displayed is the narrow one.<br />
thanks in advance,<br />
uri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dawn Isaac</title>
		<link>http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/comment-page-1/#comment-504</link>
		<dc:creator>Dawn Isaac</dc:creator>
		<pubDate>Fri, 20 Jan 2006 04:59:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/#comment-504</guid>
		<description>Awesome Thanks.</description>
		<content:encoded><![CDATA[<p>Awesome Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: LcF</title>
		<link>http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/comment-page-1/#comment-430</link>
		<dc:creator>LcF</dc:creator>
		<pubDate>Thu, 05 Jan 2006 05:48:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/#comment-430</guid>
		<description>wordpess wiki is OLD. you should visit codex.wordpress.org for documentation. 
Here is the updated documentation for wp_get_archives: 
http://codex.wordpress.org/Template_Tags/wp_get_archives</description>
		<content:encoded><![CDATA[<p>wordpess wiki is OLD. you should visit codex.wordpress.org for documentation.<br />
Here is the updated documentation for wp_get_archives:<br />
<a href="http://codex.wordpress.org/Template_Tags/wp_get_archives" rel="nofollow">http://codex.wordpress.org/Template_Tags/wp_get_archives</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: EngLee</title>
		<link>http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/comment-page-1/#comment-427</link>
		<dc:creator>EngLee</dc:creator>
		<pubDate>Thu, 05 Jan 2006 01:21:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.szehau.com/archives/2006/01/recent-wordpress-posts-in-sidebar/#comment-427</guid>
		<description>LOL. That function is so much easier!

As for the is_home() or is_page() functions, I also faced the same problem. But I fixed it another way.

if (is_home()) {

} else if (is_page()) {

}

That would do the job. This means that if you want something to appear in home and page, you have to write it in both cases.</description>
		<content:encoded><![CDATA[<p>LOL. That function is so much easier!</p>
<p>As for the is_home() or is_page() functions, I also faced the same problem. But I fixed it another way.</p>
<p>if (is_home()) {</p>
<p>} else if (is_page()) {</p>
<p>}</p>
<p>That would do the job. This means that if you want something to appear in home and page, you have to write it in both cases.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
