Witam,
mam problem z paginacją w Wordpressie. Wszystko się wyświetla poprawnie, w url wyskakuje np. /page/2 a w paginacji zostaje dalej klasa current na 1 i posty wyświetlane są wciąż te same.
Mój kod:
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
query_posts('posts_per_page=3&offset=1&paged=' . $paged);
if ( have_posts() ) : while ( have_posts() ) : the_post();
?><article class="article-content">
<h7 class="author">Autor: <a href="<?php the_author_link(); ?>"><?php the_author(); ?></a></h7>
<h3><?php the_title(); ?></h3>
<p><?php the_content(''bla bla bla); ?></p>
<h7 class="categorie">Kategoria: <?php the_category(''); ?></h7>
<h7 class="tags">Tagi: <?php the_tags( '', ', ', '' ); ?></h7>
</article>
<?php endwhile; ?>
<?php
global $wp_query;
$big = 999999999;
echo paginate_links( array(
'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ),
'format' => '?paged=%#%',
'current' => max( 1, get_query_var('paged') ),
'total' => $wp_query->max_num_pages
) );
?>
<?php else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>