• Resolved hleV

    (@hlev)


    Hello. I’m making a theme and I want both index/archive and single post/page paginations to look alike, and they need to have both prev/next links and page numbers. For index/archive, paginate_links() is great, but wp_link_pages() lacks features.

    For prev/next links in single page/post pagination I use this, but I still require the paginate_links() feature to only display a certain amount of numbers on the sides and the middle.

    So, would it be difficult to get single post/page navigation to work exactly like index/archive one?
    (Won’t be able to make it myself as I’m relatively new, so tell me it’s hard and I’ll be fine without it.)

Viewing 1 replies (of 1 total)
  • Thread Starter hleV

    (@hlev)

    Got it to work by using paginate_links() in single post/page with these parameters:

    global $page, $numpages;
    
    echo paginate_links(array
    (
        'base' => esc_url(get_permalink() . '%#%'),
        'current' => max(1, $page),
        'total' => $numpages
    ));

Viewing 1 replies (of 1 total)
  • The topic ‘A Better wp_link_pages()?’ is closed to new replies.