Pagination on Shifter

Pagination on Shifter

Shifter will get  paginate link of “Pages” or “Posts”, which returns ture of  is_single()  function, from the result of  wp_link_pages() function.  Shifter lists up URL should e generated from the result of wp_link_pages() function.
Shifter also generate pagination, if “Pages” have  wp_link_pages() function.
 

In case of the Page with templates which have pseudo-added-page-links.

The wp_link_pages() function will not create page links in this case. You should create paginate link by using filter hook wp_link_pages.
c.f. post-template.php line #L856 in tags/4.9.2/src/wp-includes

sample code

The filter hook is affected on post-template.php line #L938 in tags/4.9.2/src/wp-includes , so use filter hook  wp_link_pages .

Here is our sample code: 

add_filter( 'wp_link_pages', function( $output, $args ){
    // write some code here for modifying $output when the Page.
    return $output;
}, 10, 2 );

Take the Next Step

Get started on your website today with Shifter. Try out our free plan and take the first step towards building the perfect website for you and your visitors.

Copyright © 2023 DigitalCube

A product by

Check out our other products