<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Reset del query_posts per navigare dalla seconda pagina in poi in wordpress]]></title><description><![CDATA[<p dir="auto">Ciao a tutti, sono riuscito a creare il loop che mi serviva nella mia home page in wordpress, ora però non riesco a capire come chiuderlo per ripristinare la funzione di paginazione. Cioè il problema è che quando vado a pagina 2 e successive gli articoli sono sempre gli stessi.</p>
<p dir="auto">Ho capito che dovrei "resettare il query posts" ma non ci riesco, qualcuno saprebbe aiutarmi? Grazie mille....</p>
<pre><code>&lt;?php query_posts('cat=0&amp;showposts=1&amp;cat=-156, -125'); ?&gt;
&lt;?php while (have_posts()) : the_post(); ?&gt;
&lt;div id="evidenza"&gt;
&lt;h2&gt;&lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="&lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/h2&gt;
&lt;?php the_content_rss('', FALSE, '', 95); ?&gt;

&lt;p&gt;&lt;div class="post-info"&gt;&lt;span class="date"&gt;&lt;?php the_time('j/n/Y'); ?&gt;&lt;/span&gt; | &lt;span class="autore"&gt;Di &lt;?php the_author_posts_link(); ?&gt;&lt;/span&gt; | &lt;span class="comments"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;#forum"&gt; Commenti (&lt;?php comments_number('0','1','%'); ?&gt;)&lt;/a&gt;&lt;/span&gt; | &lt;a href="&lt;?php the_permalink() ?&gt;" rel="bookmark" title="&lt;?php the_title(); ?&gt;"&gt;Leggi il resto...&lt;/a&gt;&lt;/div&gt;&lt;/p&gt;

&lt;/div&gt;
&lt;?php endwhile; ?&gt;

&lt;?php query_posts($query_string  . '&amp;cat=-156, -125&amp;offset=1'); ?&gt;
&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;

&lt;div id="schede_articoli"&gt;
	&lt;div class="articolo"&gt;
		&lt;span class="titolo_articolo"&gt;
		&lt;?php the_title(); ?&gt;
		&lt;/span&gt;
			&lt;div class="testo_articolo"&gt;
			&lt;?php the_content_rss('', FALSE, '', 40); ?&gt;
			&lt;/div&gt;
	&lt;/div&gt;
		&lt;div class="post-info"&gt;&lt;span class="date"&gt;&lt;?php the_time('j/n/Y'); ?&gt;&lt;/span&gt; | &lt;span class="comments"&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;#forum"&gt; Commenti (&lt;?php comments_number('0','1','%'); ?&gt;)&lt;/a&gt;&lt;/span&gt; | &lt;a href="&lt;?php the_permalink() ?&gt;"&gt;Leggi&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;

&lt;?php endwhile; ?&gt;



&lt;?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?&gt;
</code></pre>
]]></description><link>https://dev.connect.gt/topic/158680/reset-del-query_posts-per-navigare-dalla-seconda-pagina-in-poi-in-wordpress</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 21:58:34 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/158680.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 03 Oct 2011 10:49:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Reset del query_posts per navigare dalla seconda pagina in poi in wordpress on Mon, 03 Oct 2011 14:25:56 GMT]]></title><description><![CDATA[<blockquote>
<p dir="auto"><strong>dezrait</strong></p>
<p dir="auto">Ciao,</p>
<p dir="auto">provato wp_reset_query con h t t p: // <a href="http://codex.wordpress.org/Function_Reference/wp_reset_query" rel="nofollow ugc">codex.wordpress.org/Function_Reference/wp_reset_query</a><br />
Ciao</p>
</blockquote>
<p dir="auto">dezrait, grazie per la risposta... ho provato con questa funzione e anche le simili... ma non riesco proprio a capire come funziona. Io dovrei dire allo script che mi deve chiudere i 2 query_posts nella home page e poi mi deve ricominciare dall'articolo 11 nella seconda pagina e via dicendo... Forse così è più semplice?</p>
]]></description><link>https://dev.connect.gt/post/1027920</link><guid isPermaLink="true">https://dev.connect.gt/post/1027920</guid><dc:creator><![CDATA[butred77]]></dc:creator><pubDate>Mon, 03 Oct 2011 14:25:56 GMT</pubDate></item><item><title><![CDATA[Reply to Reset del query_posts per navigare dalla seconda pagina in poi in wordpress on Mon, 03 Oct 2011 14:17:09 GMT]]></title><description><![CDATA[<p dir="auto">Ciao,</p>
<p dir="auto">provato wp_reset_query con h t t p: // <a href="http://codex.wordpress.org/Function_Reference/wp_reset_query" rel="nofollow ugc">codex.wordpress.org/Function_Reference/wp_reset_query</a><br />
Ciao</p>
]]></description><link>https://dev.connect.gt/post/1027919</link><guid isPermaLink="true">https://dev.connect.gt/post/1027919</guid><dc:creator><![CDATA[dezrait]]></dc:creator><pubDate>Mon, 03 Oct 2011 14:17:09 GMT</pubDate></item></channel></rss>