<?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: Show latest posts on a page other than the WordPress main page</title>
	<atom:link href="http://www.theblog.ca/latest-posts-outside-main-page-wordpress/feed" rel="self" type="application/rss+xml" />
	<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress</link>
	<description>Useful tips on Canada, cell phones, banking, technology, WordPress, PHP and more</description>
	<lastBuildDate>Fri, 10 Feb 2012 07:48:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
	<item>
		<title>By: Carlos</title>
		<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress/comment-page-1#comment-18115</link>
		<dc:creator>Carlos</dc:creator>
		<pubDate>Wed, 25 Jan 2012 21:58:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=468#comment-18115</guid>
		<description>many thanks for posting this !!</description>
		<content:encoded><![CDATA[<p>many thanks for posting this !!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Kazinec</title>
		<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress/comment-page-1#comment-18110</link>
		<dc:creator>Ryan Kazinec</dc:creator>
		<pubDate>Tue, 24 Jan 2012 22:14:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=468#comment-18110</guid>
		<description>I&#039;m sure the individual figured out how to utilize pagination with this but I didn&#039;t see the solution mentioned here so I figured I&#039;d post it here to help others out. 

Replace this query: 
&lt;?php query_posts(‘show_posts=5′); ?&gt;

With this query:

&lt;!--Change The Amount of Results You Wish To Display Per Page--&gt;
&lt;?php 
$offset = &quot;0&quot;;
$no_of_posts = &quot;15&quot;; //Number of posts to display on each page
if (preg_match(&#039;/page/&#039;, $_SERVER[&#039;REQUEST_URI&#039;])) {
	$uri = explode(&#039;/&#039;, $_SERVER[&#039;REQUEST_URI&#039;]);
	foreach ($uri as $key=&gt;$value) {
		if ($value == &quot;&quot;) {
		unset($uri[$key]);
		}
	}
	$offset = (array_pop($uri) * 15) - 15; //Both These Numbers Should Match the $no_of_posts 
}
query_posts(&#039;posts_per_page=&#039; . $no_of_posts . &#039;&amp;offset=&#039; . $offset); ?&gt;

CREDIT for this code: This is not my code please visit the source link below! Special thanks to Jarod Taylor.

http://jarodtaylor.com/blog/wordpress-ultimate-archive-index-with-pagination</description>
		<content:encoded><![CDATA[<p>I&#8217;m sure the individual figured out how to utilize pagination with this but I didn&#8217;t see the solution mentioned here so I figured I&#8217;d post it here to help others out. </p>
<p>Replace this query:<br />
&lt;?php query_posts(‘show_posts=5′); ?&gt;</p>
<p>With this query:</p>
<p>&lt;!&#8211;Change The Amount of Results You Wish To Display Per Page&#8211;&gt;<br />
&lt;?php<br />
$offset = &quot;0&quot;;<br />
$no_of_posts = &quot;15&quot;; //Number of posts to display on each page<br />
if (preg_match(&#8216;/page/&#8217;, $_SERVER['REQUEST_URI'])) {<br />
	$uri = explode(&#8216;/&#8217;, $_SERVER['REQUEST_URI']);<br />
	foreach ($uri as $key=&gt;$value) {<br />
		if ($value == &quot;&quot;) {<br />
		unset($uri[$key]);<br />
		}<br />
	}<br />
	$offset = (array_pop($uri) * 15) &#8211; 15; //Both These Numbers Should Match the $no_of_posts<br />
}<br />
query_posts(&#8216;posts_per_page=&#8217; . $no_of_posts . &#8216;&amp;offset=&#8217; . $offset); ?&gt;</p>
<p>CREDIT for this code: This is not my code please visit the source link below! Special thanks to Jarod Taylor.</p>
<p>http://jarodtaylor.com/blog/wordpress-ultimate-archive-index-with-pagination</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SABOND</title>
		<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress/comment-page-1#comment-15856</link>
		<dc:creator>SABOND</dc:creator>
		<pubDate>Thu, 12 May 2011 02:18:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=468#comment-15856</guid>
		<description>Hi! I have one problem - your code doesn&#039;t work with plugin wich allows to use &lt;!--more--&gt; tag to show as many lines as I want - posts are expanded, but I need them to have just first 3 lines. I have the following code - 

&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;
&lt;?php the_content( &#039;... Full New »»&#039;, $more_link_text , $strip_teaser, $more_file ); ?&gt;
&lt;div style=&quot;height: 26px&quot;&gt;&lt;/div&gt;
&lt;?php endwhile; else: ?&gt;
&lt;h1&gt;Woops...&lt;/h1&gt;&lt;br&gt;
Sorry, no posts were found.
&lt;?php endif; ?&gt;
&lt;?php posts_nav_link(); ?&gt;

And after adding &lt;?php query_posts(&#039;show_posts=5&#039;); ?&gt; before all this code posts start to show, but they are expanded. At home page they are OK!

&lt;strong&gt;Reply from Peter: I don&#039;t know how your plugin code hooks into WordPress, so that would be a question for the plugin author.&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Hi! I have one problem &#8211; your code doesn&#8217;t work with plugin wich allows to use &lt;!&#8211;more&#8211;&gt; tag to show as many lines as I want &#8211; posts are expanded, but I need them to have just first 3 lines. I have the following code &#8211; </p>
<p>&lt;?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?&gt;<br />
&lt;?php the_content( &#8216;&#8230; Full New »»&#8217;, $more_link_text , $strip_teaser, $more_file ); ?&gt;<br />
&lt;div style=&quot;height: 26px&quot;&gt;&lt;/div&gt;<br />
&lt;?php endwhile; else: ?&gt;<br />
&lt;h1&gt;Woops&#8230;&lt;/h1&gt;&lt;br&gt;<br />
Sorry, no posts were found.<br />
&lt;?php endif; ?&gt;<br />
&lt;?php posts_nav_link(); ?&gt;</p>
<p>And after adding &lt;?php query_posts(&#8216;show_posts=5&#8242;); ?&gt; before all this code posts start to show, but they are expanded. At home page they are OK!</p>
<p><strong>Reply from Peter: I don&#8217;t know how your plugin code hooks into WordPress, so that would be a question for the plugin author.</strong></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: DeaFischer</title>
		<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress/comment-page-1#comment-15392</link>
		<dc:creator>DeaFischer</dc:creator>
		<pubDate>Mon, 14 Feb 2011 12:13:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=468#comment-15392</guid>
		<description>Hello, I have a homepage that is not a WordPress Blog, and there, in the front page, i wanted to show the recent wordpress blogs.
For this I call:

&lt;?php
// Include WordPress 
define(&#039;WP_USE_THEMES&#039;, false);
require(&#039;/mypath/wp-load.php&#039;);
query_posts(&#039;showposts=1&#039;);
?&gt;

Unfortunatelly it does not work and returns an error: 
&quot;Error establishing a database connection&quot;

Can someone help me in this case???
Thanx a lot in advance</description>
		<content:encoded><![CDATA[<p>Hello, I have a homepage that is not a WordPress Blog, and there, in the front page, i wanted to show the recent wordpress blogs.<br />
For this I call:</p>
<p>&lt;?php<br />
// Include WordPress<br />
define(&#8216;WP_USE_THEMES&#8217;, false);<br />
require(&#8216;/mypath/wp-load.php&#8217;);<br />
query_posts(&#8216;showposts=1&#8242;);<br />
?&gt;</p>
<p>Unfortunatelly it does not work and returns an error:<br />
&quot;Error establishing a database connection&quot;</p>
<p>Can someone help me in this case???<br />
Thanx a lot in advance</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Faithe T</title>
		<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress/comment-page-1#comment-13592</link>
		<dc:creator>Faithe T</dc:creator>
		<pubDate>Thu, 15 Jul 2010 19:49:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=468#comment-13592</guid>
		<description>Sweet! This is EXACTLY what I was looking for... and simple too!

THANK YOU, THANK YOU!</description>
		<content:encoded><![CDATA[<p>Sweet! This is EXACTLY what I was looking for&#8230; and simple too!</p>
<p>THANK YOU, THANK YOU!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dan W</title>
		<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress/comment-page-1#comment-13554</link>
		<dc:creator>Dan W</dc:creator>
		<pubDate>Sun, 11 Jul 2010 22:58:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=468#comment-13554</guid>
		<description>Thanks for this post. I was spending hours trying to figure out why the loop wouldn&#039;t work on a page template. Surprising how little code help there is out there for WordPress.</description>
		<content:encoded><![CDATA[<p>Thanks for this post. I was spending hours trying to figure out why the loop wouldn&#8217;t work on a page template. Surprising how little code help there is out there for WordPress.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Pinto</title>
		<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress/comment-page-1#comment-13452</link>
		<dc:creator>Pinto</dc:creator>
		<pubDate>Sun, 04 Jul 2010 02:43:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=468#comment-13452</guid>
		<description>Thank you so much Peter,

The simple thing was &quot;big&quot; for me to do.

i didn&#039;t know that it&#039;s so simple to do !

Thanks a lot for the tut !

Best Regs,
Pinto.</description>
		<content:encoded><![CDATA[<p>Thank you so much Peter,</p>
<p>The simple thing was &quot;big&quot; for me to do.</p>
<p>i didn&#8217;t know that it&#8217;s so simple to do !</p>
<p>Thanks a lot for the tut !</p>
<p>Best Regs,<br />
Pinto.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Roger</title>
		<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress/comment-page-1#comment-13033</link>
		<dc:creator>Roger</dc:creator>
		<pubDate>Fri, 21 May 2010 19:23:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=468#comment-13033</guid>
		<description>That works, except it uses the page template for the home page.

If you have a custom template for the home page that interferes with normal post display, you have problems.</description>
		<content:encoded><![CDATA[<p>That works, except it uses the page template for the home page.</p>
<p>If you have a custom template for the home page that interferes with normal post display, you have problems.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mpan</title>
		<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress/comment-page-1#comment-12843</link>
		<dc:creator>mpan</dc:creator>
		<pubDate>Thu, 15 Apr 2010 07:29:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=468#comment-12843</guid>
		<description>oh man, i&#039;ve been going crazy trying to figure out why my page wouldn&#039;t show my posts, even though i had all the code. OR SO I THOUGHT.

THANK YOU for sharing the query_posts solution! that really helped.

*good karma your way*</description>
		<content:encoded><![CDATA[<p>oh man, i&#8217;ve been going crazy trying to figure out why my page wouldn&#8217;t show my posts, even though i had all the code. OR SO I THOUGHT.</p>
<p>THANK YOU for sharing the query_posts solution! that really helped.</p>
<p>*good karma your way*</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: shiqianlu</title>
		<link>http://www.theblog.ca/latest-posts-outside-main-page-wordpress/comment-page-1#comment-11580</link>
		<dc:creator>shiqianlu</dc:creator>
		<pubDate>Sun, 13 Sep 2009 13:30:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.theblog.ca/?p=468#comment-11580</guid>
		<description>Hello!
When I use &quot;query_posts()&quot;,I find it doesn&#039;t support page navigation. Every page of the index is the same. Could you help me out of the trouble?

&lt;strong&gt;Reply from Peter: There are parameters &quot;showposts&quot; and &quot;offset&quot; that you can use in the query_posts() function to help with page navigation.  Check the &lt;a href=&quot;http://codex.wordpress.org/Template_Tags/query_posts&quot; rel=&quot;nofollow&quot;&gt;documentation&lt;/a&gt; for more information.&lt;/strong&gt;</description>
		<content:encoded><![CDATA[<p>Hello!<br />
When I use &quot;query_posts()&quot;,I find it doesn&#8217;t support page navigation. Every page of the index is the same. Could you help me out of the trouble?</p>
<p><strong>Reply from Peter: There are parameters &#8220;showposts&#8221; and &#8220;offset&#8221; that you can use in the query_posts() function to help with page navigation.  Check the <a href="http://codex.wordpress.org/Template_Tags/query_posts" rel="nofollow">documentation</a> for more information.</strong></p>
]]></content:encoded>
	</item>
</channel>
</rss>

