Articles of wp link pages

How to deal with equal & similar arguments for a function?

I’m currently extending my pagination plugin, after a hint by @toscho. So the plugin will now use the same filters, hooks and arguments as the native wordpress pagination functions. My problem is that the different wp functions name their arguments … different. Example: This is how you change the text for the “Next” link. wp_link_page() […]

wp_link_page – wrap current page element

I’m trying to make something more meaningful out of the wp_link_pages() result: $paged_page_nav = wp_link_pages( array( ‘echo’ => false ) ); // Now let’s wrap the nav inside <li>-elements $paged_page_nav = str_replace( ‘<a’, ‘<li class=”‘.$classes.'”><a’, $paged_page_nav ); $paged_page_nav = str_replace( ‘/a>’, ‘/a></li>’, $paged_page_nav ); // here I’d need to wrap the currently displayed page element […]

How to style current page number (wp_link_pages)?

When a post is split on more pages TwentyTen theme use the native function wp_link_pages to display a navigation page bar at the end of post. I am trying to style those elements for my theme, but unfortunately it seems that the current page number cannot be styled. I imagine that I should override the […]

When paginating a Page with the <!–nextpage–> tag, how can the 2nd and subsequent page styles be customised?

I want to apply different styles for a second page in single.php or posts. How can I do this? I have the following code in single.php to split the page in two parts: <!–nextpage–> If there is a different method to add another “tab” to post or the like, I am grateful for any help… I […]

Display only the current page number and another numbered page in pagination

I need some help with pagination. The pagination should only display the current page and another numbered page, like so: << | 2 | …3 | >> At the moment, it shows all page numbers: << | 1 | 2 | 3 | …3 | >> Any ideas how to change this? This is the […]

Can I add a 'show all pages' link to wp link pages?

I use wp_link_pages to paginate individual pages and posts. Is there a way I can add to it an extra link which’ll show all pages together, on a single page rather than split?

Append a <!–nextpage–> to every post to force additional page link (and static content)

I’m trying to affect either the content or the $post->post_content directly, before the post get read by the wp_link_pages() function, to inject a little bit of static text or javascript after the content of every post on my site. I’ve tried appending it with an add_filter in the functions.php of my theme, but that doesn’t […]

wp_link_pages: display current page number only if has multiple page breaks?

I’m trying to build a function to display the current chapter (page) within the single.php file ONLY if there’s more than one chapter (page break). This function will output the chapter # within the page header under the title. Then I will customize and use the wp_link_pages at the bottom for the chapter pagination. Currently, […]

Add a Class to Current Page WP_LINK_PAGES

I’ve noticed WordPress has some illogical differences between wp_link_pages and paginate_links. Specifically, WP_LINK_PAGES does not automatically add a class to the current page like paginate_links does. Anybody have a quick functions fix?

Customizing wp_link_pages

I want to create a pagenation using wp_link_pages that looks like this Previous 3 of 20 Next How can this be achieved? I am using this function btw