How to get only the URL of nextpage (without tag)
If you check out the source of _wp_link_page, you’ll see all the URL calculations are coded directly within – you can either lift this code straight out into your own function, or sprinkle a little regex around the existing function: function wpse_204737_get_post_page_url( $i ) { if ( preg_match( ‘/href=”https://wordpress.stackexchange.com/questions/204737/([^”]+)”https://wordpress.stackexchange.com/”, _wp_link_page( $i ), $match ) ) … Read more