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.
Ho capito che dovrei "resettare il query
posts" ma non ci riesco, qualcuno saprebbe aiutarmi? Grazie mille....
Codice:
<?php query_posts('cat=0&showposts=1&cat=-156, -125'); ?>
<?php while (have_posts()) : the_post(); ?>
<div id="evidenza">
<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h2>
<?php the_content_rss('', FALSE, '', 95); ?>
<p><div class="post-info"><span class="date"><?php the_time('j/n/Y'); ?></span> | <span class="autore">Di <?php the_author_posts_link(); ?></span> | <span class="comments"><a href="<?php the_permalink(); ?>#forum"> Commenti (<?php comments_number('0','1','%'); ?>)</a></span> | <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>">Leggi il resto...</a></div></p>
</div>
<?php endwhile; ?>
<?php query_posts($query_string . '&cat=-156, -125&offset=1'); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div id="schede_articoli">
<div class="articolo">
<span class="titolo_articolo">
<?php the_title(); ?>
</span>
<div class="testo_articolo">
<?php the_content_rss('', FALSE, '', 40); ?>
</div>
</div>
<div class="post-info"><span class="date"><?php the_time('j/n/Y'); ?></span> | <span class="comments"><a href="<?php the_permalink(); ?>#forum"> Commenti (<?php comments_number('0','1','%'); ?>)</a></span> | <a href="<?php the_permalink() ?>">Leggi</a></div>
</div>
<?php endwhile; ?>
<?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?>