-
Hi there,
Thank you for providing Rank Math plugin which I really appreciate.
However, I have an issue with several filters I am using.
I want RankMath to control all the SEO on my site, but I need to remove certain tags from just product category pages.
For example, I am using the following code to remove RankMath generated <title> tags from just product category URLs:
/**
* Allow changing of the RankMath <title> tag.
*
* @param string $title.
*/
add_filter( ‘rank_math/frontend/title’, function( $title ) {
if (is_product_category())
return false;
});This is working, but it is also removing the RankMath <title> tag from single product description pages as well, which I need to keep in place.
I have tried disabling other plugins in case there is a conflict and still can’t get this to work just for product category URLs.
The same issue occurs if I use (is_archive) this is also changing the single product pages.
Is there a line I can add to the code to ensure this doesn’t affect the single product page?
Many thanks
The ticket ‘Filter For Product Category Also Controlling Single Product Pages’ is closed to new replies.