• I am creating wordpress loop and I need it to act like this: -show first 5 posts -get back to 0 post -show again first 5 posts -show second 5 posts – get back to 5th post

    So in short I want it to move 5 posts back every 5 posts. I can use if for this but I cant find value that describes what post number is currently displayed. I have tried $this->current_post and it echoes posts numbers with no problems. But if I try to change this value for example:
    $rewind_posts_bol = true

    if ($rewind_posts_bol){
      $this->current_post = 3;
    rewind_posts_bol = false;
    }

    If I understand it correctly then this code should do something like offset 3 but it isnt working. So is there any way to rewind posts by desired number?

    Thanks in forward

  • The topic ‘Rewind posts in loop by desired number’ is closed to new replies.