Am looking for a good method to add a #hash to Wordpress Paged Navigation
The basic code, something like this
<nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
<ul>
<li class="previous">
<?php next_posts_link( __( '<span class="meta-nav">Load more</span>', '' ) ); ?>
</li>
</ul>
Output
http://myurl.com/page/2/
Problem
Am running 3 individual queries on index page so i would need to add a #hash to the url to make it load the right content. Am looking for a built in function or other smart / light way of achieving a url for my next_posts_link( ); looking something like this
http://myurl.com/page/2/#hash
Have been looking around but most solutions gravitate around breaking it apart, modify and rebuild. It works well but am thinking there must be a better way!!
Any smart suggestions?
You could try