Remove page from canonical on paged archives

#169545
  • Resolved Eri Meilis
    Rank Math free

    I try to use
    add_filter( ‘rank_math/frontend/canonical’, function( $canonical ) {
    if ( is_paged() ) {
    return get_main_page_url();
    }
    //return ‘test’;
    return $canonical;
    });
    I place it in my functions.php

    It doesn’t work.
    If i try uncomment “return test” just for testing, – i guess, all canonicals should become “test”, – they don’t. So i guess, somewhat the filter isn’t working.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Hello,

    Thank you for contacting Rank Math and bringing your concern to our attention. I’m sorry for the delay and for any inconvenience this issue may have caused you.

    If you wanted to remove the canonical to your Archive paged archives, Rank Math automatically adds the canonical if the posts/pages are set to index. You can noindex the paginated archive pages to remove the canonical in Rank Math > Titles & Meta > Misc Pages: Noindex Archive Subpages
    Noindex Archive Paginated

    Please note that some options are only available when you enable the Advanced Mode in Rank Math. If it’s not showing, you must have chosen to use the Easy Mode. Please follow the steps in this link to switch to Advanced Mode:
    https://rankmath.com/kb/advanced-mode/

    I hope that helps. Thank you, and looking forward to your update.

    No, i don’t need to remove it. I just want them to be equal on any page of the archive.

    Hello,

    Thanks for getting back to us.

    We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
    Sensitive Data Section

    It is completely secure and only our support staff has access to that section. If you want, you can use the below plugin to generate a temporary login URL to your website and share that with us instead:

    https://wordpress.org/plugins/temporary-login-without-password/

    You can use the above plugin in conjunction with the WP Security Audit Log to monitor what changes our staff might make on your website (if any):

    https://wordpress.org/plugins/wp-security-audit-log/

    We really look forward to helping you.

    Hello,

    I have updated the sensitive data as requested. Can you please check further?

    Thank you.

    Anonymous
    Rank Math free

    Hi, We are sorry for being late in making reply.

    I have corrected the code snippet on your website and found it working now as the way you wanted.

    Please don’t hesitate to ask any other questions you have. Thanks

    It works now, thank you!

    Hello,

    We are super happy that this issue is already resolved. If you have any other questions in the future, know that we are here to help you.

    If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.

    If you have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)

You must be logged in to reply to this ticket.