• Resolved varape

    (@varape)


    Hello There

    Here is my situation :
    On my index page, i got :
    – one simple loop to show the last post in a special style
    – an other simple loop with different style for the before the last post
    – a classical loop with again a different style for all the other posts. So i put a Query Post offset just before this classical loop to show all the posts

    – I have installed the plain wp_pagenavi

    My problem is that when click on the pagination (page 2 for example), all the images are lost and i got only 2 different posts in the first and second simple loop. The classical loop do not change and the pagination stay on “1”.
    After some search, the problem seems to be the Query post offset, i tried a lot of pagination plug and php functions but nothing works.
    Maybe someone can help me here, to be honest, i am completely lost !

    This is my code :

    [three blocks of code moderated – please use the pastebin for any code over the forum limit of 10 lines]

    help ! 🙂

Viewing 4 replies - 1 through 4 (of 4 total)
  • ‘offset’ and pagination does not work together.

    try to work with a different method to explude duplicate posts:
    http://codex.ww.wp.xz.cn/The_Loop#Multiple_Loops_in_Action

    Thread Starter varape

    (@varape)

    Hello

    Thanks for this answer ! I’m gone look deeper your link and will tell you if it fixed my problem.

    Thread Starter varape

    (@varape)

    Ok it works but one problem still here.
    So i have :
    – one simple loop (that show the last post per page) with a special style
    – one other simple loop (that show the before the last post per page)
    – the classical loop with the php code :

    <?php if (have_posts()) : while (have_posts()) : the_post();
      if( $post->ID == $do_not_duplicate ) continue; ?>

    – pagination is now working

    The problem is that when i click on page 2 for example, all posts are here (perfect) but all the other images (static for example, navigation…) Disapear like they are not found… any idea ? 🙂

    Thread Starter varape

    (@varape)

    Ok i just changed the relative link to absolute path link and now all is working nicely !
    Thanks for help 🙂

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

The topic ‘Problem with Query Post, pagination and Offset’ is closed to new replies.