WordPress.org

Support

Support » Plugins and Hacks » [Plugin: WP-PageNavi] how to add anchor to the page link

[Plugin: WP-PageNavi] how to add anchor to the page link

  • Hi!

    First of all thank you very much for the great plugin. Must have imo!

    I have a gallery at the top of my site and the blog posts below it. Each time I go to the next page it loads at the top. I want to add a simple anchor – lets call it ‘blog’ – just below the gallery and add #blog to pagenavi links. Could you please tell me where in the code should I put #blog to make it work?

    Thank you in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • I think that most probably I should change line 164 in core.php:

    return "<a href='" . esc_url( get_pagenum_link( $page)) ."' class='$class'>$text</a>";

    but how exactly???

    Plugin Author scribu

    @scribu

    return "<a href='" . esc_url( get_pagenum_link( $page)) ."#blog' class='$class'>$text</a>";

    scribu,

    Thanks for reply. Your solution works – link looks …/page/2/#blog

    any idea how to do the same with previous/next page links?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WP-PageNavi] how to add anchor to the page link’ is closed to new replies.