Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
Meanwhile the canonical is automatically added in your site by Rank Math, you could use the following filter (you will need to customize it a little to check if you are in the category you don’t want the Rank Math’s canonical) to remove the Rank Math canonical there:
add_action( 'wp_head', function(){
if( /* Check here if you are inside the category where you don't want the canonical */) {
remove_all_actions( 'rank_math/head' );
add_action( 'wp_head', '_wp_render_title_tag', 2 );
}
}, 1 );
Looking forward to helping you. Thank you.
Hi,
Thanks, can I add a filter to include all Geodirectory categories or do they have to be done individually? Where would I add this filter?
Thanks
Hello,
You could code the conditional to include all the categories and their posts so you only need to add the filter once.
You will need to add it at the end of your current theme’s functions.php file.
Looking forward to help you.
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.