• I’m using this code to split my posts into two:


    <?php query_posts('showposts=1') ?>
    <?php if (have_posts()) : ?>
    <?php while (have_posts()) : the_post(); ?>

    ........ 1st Post Code ..........

    <?php endwhile; ?>

    <?php $posts = get_posts('numberposts=19&offset=1');
    foreach($posts as $post):
    setup_postdata($post);
    ?>

    ....... Code of second posts .......

    <?php endforeach; ?>

    But now the navigation doesn’t seem to work anymore. When i click ‘Previoud/Next entries’ wordpress goes to /index.php?paged=2 but actually only the first posts are shown. I want to keep the 1st Post Code, but when I navigate the posts of the 2nd Posts have to change. Is this possible?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Moderator Samuel Wood (Otto)

    (@otto42)

    www.remarpro.com Admin

    What’s the purpose of this split? Is it for look only? Do you want the first post to always be the latest and not page?

    I know exactly why your paging doesn’t work, it’s because you’re using get_posts for the second loop. But how to fix it is hard to say without understanding the purpose behind your code.

    When asking for help, it’s always best to state the end goal, and not just the details about the mechanism. ??

    Thread Starter davey579

    (@davey579)

    Yes, it is for look only. I already thought it was something because i splitted into two, so i include the code ??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Page navigation doesn’t work’ is closed to new replies.