Site logo

[Support request] Pagination Anchor

Home Forums Support [Support request] Pagination Anchor

Home Forums Support Pagination Anchor

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1226388
    Fabien

    Hi,

    For my archives, I’ve created a custom template with static content above the loop. Is there a way to add an anchor to the pagination link (like https://domain.com/category/page/2#latest-articles) ?

    Thanks a lot !

    #1226823
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Dove into the core code a bit and found this filter: paginate_links

    Not sure if it will work, but it’s worth a shot:

    add_filter( 'paginate_links', function( $links ) {
        return $links . '#latest-article';
    } );
    #2402539
    Heinrich

    Hi Tom,

    the code works perfect for the numbers but not for “previous page” and “next page”. I hope you can help me out.

    best wishes

    #2402931
    Leo
    Staff
    Customer Support

    Hey!

    This topic is a bit old. Can you open a new one and describe what you are trying to achieve?

    Feel free to reference back to one as well.

    Thanks!

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.