• Resolved brvnbld

    (@brvnbld)


    Am using Display Posts Pagination plugin, and thus I have some paginated pages from Homepage. But those all paginated pages all have same canonical Urls generated by Rank Math plugin, which is the same as the homepage.

Viewing 1 replies (of 1 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @brvnbld,
    ?
    Thank you for contacting Rank Math support.
    ?
    You can use and customize this filter to set your paginated pages to have a self-referencing canonical URL:
    ?
    add_filter( ‘rank_math/frontend/canonical’, function( $canonical ) {
    global $wp; $current_slug = home_url( $wp->request );
    if ( is_paged()) {
    $canonical = $current_slug . ‘/’;
    }
    return $canonical;
    });
    ?
    Here’s a guide to adding the filter to your website:
    https://rankmath.com/kb/wordpress-hooks-actions-filters/
    ?
    Looking forward to helping you.

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.