How to add meta tags or canonical on faceted navigational URLs using Rank Math?

#284321
  • Resolved BabyGo SEO
    Rank Math free

    How to add meta tags or canonical on faceted navigational URLs using Rank Math?

    I want to change canonical tags for URLs generated by filters. Is there any way to do that?

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

    Thank you for contacting the support, and sorry for any inconvenience that might have been caused due to that.

    Faceted Navigation URLs are usually generated dynamically. You can modify and use the following filter in your theme’s functions.php file to set the canonical URL manually: https://rankmath.com/kb/filters-hooks-api-developer/#change-canonical-url

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    So, do I need to create rank-math.php ? How to do that? What if I add those codes to functions.php

    Hello,

    Adding the code into rank-math.php is just one way to apply the filters we provide although it is much recommended if you need to organize all your Rank Math custom codes into 1 file. The benefits of using rank-math.php file is listed here.

    You can however insert the filter code in your functions.php and it should work fine as well.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Hello,

    Since we did not hear back from you for 15 days, we are assuming that you found the solution. We are closing this support ticket.

    If you still need assistance or any other help, please feel free to open a new support ticket, and we will be more than happy to assist.

    Thank you.

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

The ticket ‘How to add meta tags or canonical on faceted navigational URLs using Rank Math?’ is closed to new replies.