alternative to wp_link_pages() that only shows link to last page
Crib a bit of code from wp-includes/query.php and bit from wp-includes/post-template.php, add a little, mix and stir, and… function url_to_last_page() { global $post; $content = str_replace(“\n<!–nextpage–>\n”, ‘<!–nextpage–>’, $post->post_content); $content = str_replace(“\n<!–nextpage–>”, ‘<!–nextpage–>’, $content); $content = str_replace(“<!–nextpage–>\n”, ‘<!–nextpage–>’, $content); $pages = explode(‘<!–nextpage–>’, $content); $numpages = count($pages); $ret = _wp_link_page($numpages); $ret .= $numpages; $ret .= ‘</a>’; return … Read more