Keep Pagination in Tabs

Use the following extension to the WP_Query class. The extension only takes your arguments as an array, rather than a string format. You’ll to add individual values for “page_link” for each of your tabs. This should just be a string (“tab1”, “tab2” etc etc) Then you’ll need to use the $my_query->next() and $my_query->prev() to add … Read more

Possible to paginate on single.php?

I think the easiest implementation would be to put your infinite scroll in category.php, and then, either using Dashboard -> Settings -> Reading -> Posts per page, or via direct query modification, display one post per page. Otherwise, depending on how you’re implementing the infinite scroll, you could make use of next_post_link() and previous_post_link(), both … Read more

How to grab a specific page of content from paginated post?

nextpage pagination is a bit odd. You will have to parse the post content. This should do it. function get_nth_page($n=0,$content=””) { if (empty($content)) { global $post; $content = $post->post_content; } if (empty($content)) { return false; } $content = str_replace(“\n<!–nextpage–>\n”, ‘<!–nextpage–>’, $content); $content = str_replace(“\n<!–nextpage–>”, ‘<!–nextpage–>’, $content); $content = str_replace(“<!–nextpage–>\n”, ‘<!–nextpage–>’, $content); $pages = explode(‘<!–nextpage–>’, $content); … Read more

How to change title tags on paginated posts?

Is “WP SEO” = “WordPress SEO by Yoast”? If so, the plugin has some tags for you: %%page%% – Replaced with the current page number (i.e. page 2 of 4) %%pagetotal%% – Replaced with the current page total %%pagenumber%% – Replaced with the current page number Just look at the bottom of the page wp-admin/admin.php?page=wpseo_titles, … Read more

Custom paging function

Instead of the loop at the bottom, use WordPress’s paginate_links(): $pagination = paginate_links(array( ‘total’ => $pages, ‘current’ => $page )); echo $pagination; You can play around with some of https://codex.wordpress.org/Function_Reference/paginate_links to get the appearance the way you want. Specifically, the end_size and mid_size will help you to determine the number of page numbers that show, … Read more