WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Paginate with get_option

[Resolved] Paginate with get_option

Viewing 2 replies - 1 through 2 (of 2 total)
  • Try:

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

    Thank you for your support! Your code works well. 🙂

    And also this modified version of your code paginate the posts correctly:
    <?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("cat=1&paged=$paged"); ?>
    without specifying the get_option but using the double quote (“).

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Paginate with get_option’ is closed to new replies.