• Resolved Lars Daniel

    (@lars-daniel)


    This is the site I am working on: http://www.blog.halfdane.dk
    I have set the number of posts on the frontpage to be 5. The link “Older” should take you to the older posts, but it just loads the first 5 again.
    Help is highly appreciated.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter Lars Daniel

    (@lars-daniel)

    Ok, I have found out that a line in index.php that makes the frontpage only show a certain category, is creating the problem:
    <?php query_posts(‘cat=18&showposts=’.get_option(‘posts_per_page’)); ?>

    I don´t know how to solve it though. Anyone?

    Michael

    (@alchymyth)

    try:

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

    http://codex.wordpress.org/Function_Reference/WP_Query#Pagination_Parameters

    Thread Starter Lars Daniel

    (@lars-daniel)

    Thanks!
    Unfortunately that did not change anthing 🙁
    Other ideas?

    Thread Starter Lars Daniel

    (@lars-daniel)

    If it helps to see what is going on, here is my index.php:
    (If I remove the line in bold, the problem disappears, but so does my selection of category.)

    [code moderated – please use the pastebin]

    Michael

    (@alchymyth)

    my bad – forgot the ampersand & before the 'paged=';

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

    hopefully, this gets it to work …

    Thread Starter Lars Daniel

    (@lars-daniel)

    Yihah! You did it!
    Thanks a bunch!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘"Next/Previous posts" does not work. Help!’ is closed to new replies.