• Hello!
    I am currently migrtaing a website from drupal to wordpress and I have hit a small snag:
    In this drupal, paginations start from 0. So basically the first page is 0, second is 1, third is 2 so on and so forth.

    • This topic was modified 4 years, 7 months ago by Jan Dembowski.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    You can probably alter the query vars used to fetch a page’s worth of data through the “pre_get_posts” action. After verifying it’s the correct query being modified, add 1 to the “paged” query var.

    Likewise, when WP outputs its own links for the same, use the appropriate filter to subtract 1 from the link’s /page/ parameter. The correct filter hook depends on the post type being targeted.

Viewing 1 replies (of 1 total)
  • The topic ‘Need pagination index to start from 0’ is closed to new replies.