Hello,
Thank you for contacting Rank Math for help with setting a custom canonical for your product category pages filtered by brand.
If I understand correctly you would like to have canonical="https://yoursite.com/product-category/toy-car/?filter-brand=bmw
To do this you will have to customize our filter to modify canonical URLs:
/**
* Allow changing of the canonical URL.
*
* @param string $canonical The canonical URL.
*/
add_filter( 'rank_math/frontend/canonical', function( $canonical ) {
return $canonical;
});
You may refer to this guide for how to add filters to your website: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope that helps. Please let us know if you have questions.
Hello,
We are super happy that this resolved your issue. 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 do 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.