• Hey guys I have this code that shows recent posts

    <ul>
        <?php $the_query = new WP_Query( 'showposts=10' ); ?>
    
        <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?>
        <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></li>
    
        <li><?php the_content(__('(more…)')); ?></li>
        <?php endwhile;?>
        </ul>

    I want to paginate this with this code

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
    query_posts('posts_per_page=3&paged=' . $paged);
    ?>

    How can I combine it

    Please.

Viewing 1 replies (of 1 total)
  • Thread Starter bondigor69

    (@bondigor69)

    sorry

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    
    query_posts('posts_per_page=10&paged=' . $paged);
    ?>
Viewing 1 replies (of 1 total)
  • The topic ‘Post pagination’ is closed to new replies.