<?xml version="1.0" encoding="UTF-8"?><!-- generator="bbPress" -->

<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
>

<channel>
<title>ThemeShaper Forums Topic: Unnecessary pagination with search results</title>
<link>http://themeshaper.com/forums/</link>
<description>Help In Shaping WordPress Themes</description>
<language>en</language>
<pubDate>Fri, 24 May 2013 12:04:04 +0000</pubDate>

<item>
<title>joshuaiz on "Unnecessary pagination with search results"</title>
<link>http://themeshaper.com/forums/topic/more-posts-in-search-results#post-19006</link>
<pubDate>Mon, 07 Feb 2011 01:16:49 +0000</pubDate>
<dc:creator>joshuaiz</dc:creator>
<guid isPermaLink="false">19006@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;Instead of doing my head in, I found a plugin that does this for me:&#60;/p&#62;
&#60;p&#62;&#60;a href=&#34;http://moshublog.com/2007/10/30/custom-query-string-reloaded-for-wordpress-23-with-tag-support/&#34; rel=&#34;nofollow&#34;&#62;http://moshublog.com/2007/10/30/custom-query-string-reloaded-for-wordpress-23-with-tag-support/&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;Enjoy.
&#60;/p&#62;</description>
</item>
<item>
<title>joshuaiz on "Unnecessary pagination with search results"</title>
<link>http://themeshaper.com/forums/topic/more-posts-in-search-results#post-19005</link>
<pubDate>Sun, 06 Feb 2011 22:56:29 +0000</pubDate>
<dc:creator>joshuaiz</dc:creator>
<guid isPermaLink="false">19005@http://themeshaper.com/forums/</guid>
<description>&#60;p&#62;I want to show a specified number of posts that come back for a given search query on the search results page so I am using the following search loop:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;function childtheme_search_loop() {

 $my_query = new WP_Query(&#38;#39;posts_per_page=10&#38;#39;);
		while ($my_query-&#38;gt;have_posts()) : $my_query-&#38;gt;the_post(); ?&#38;gt;

			&#38;lt;div id=&#38;quot;post-&#38;lt;?php the_ID() ?&#38;gt;&#38;quot; class=&#38;quot;&#38;lt;?php thematic_post_class() ?&#38;gt;&#38;quot;&#38;gt;
    			&#38;lt;?php thematic_postheader(); ?&#38;gt;
				&#38;lt;div class=&#38;quot;entry-content&#38;quot;&#38;gt;
&#38;lt;?php thematic_content(); ?&#38;gt;

				&#38;lt;/div&#38;gt;
				&#38;lt;?php thematic_postfooter(); ?&#38;gt;
			&#38;lt;/div&#38;gt;&#38;lt;!-- .post --&#38;gt;

		&#38;lt;?php endwhile;
}
add_action(&#38;#39;thematic_searchloop&#38;#39;, &#38;#39;childtheme_search_loop&#38;#39;);&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;This returns 10 of the posts for the query. The problem I am having is with pagination - when you go to Page 2 of the results, it is still showing the first 10 posts and you can never access the next 10 posts. In addition, it is showing pagination based on 3 posts per page which is what I have in the Reading settings in wp-admin so it is listing 7 pages, even though I only have 24 posts.&#60;/p&#62;
&#60;p&#62;What's more, if I set ('posts_per_page=-1') I get all the posts on one page but the pagination is still there.&#60;/p&#62;
&#60;p&#62;How can I adjust this search loop to return a specified number of posts and then paginate the remaining results?
&#60;/p&#62;</description>
</item>

</channel>
</rss>
