Hello,
Thank you for contacting us.
You can use the below code to disable all the meta tags of Rank Math from any URL that contains /places/
:
add_action( 'wp_head', 'rankmath_disable_features',1);
function rankmath_disable_features() {
$url = $_SERVER['REQUEST_URI'];
if( strpos($url, '/places/') ){
remove_all_actions( 'rank_math/head');
}
}
Please let us know how that goes.
Thank you.
Hello,
You’ve very welcome.
Could you confirm if there’s anything else that we can assist you with or we can mark this ticket resolved?
Looking forward to hearing back from you.
Thank you.
Hi there, this didn’t seem to work – I’ve cleared cache, cleared server cache – cleared everything using the tools in rank math etc… but no joy – i placed this in the top of the functions.php file of the child theme – that’s the right place yeah?
Hello,
You can follow this guide to add the code:
https://rankmath.com/kb/wordpress-hooks-actions-filters/
If it still doesn’t work, we might need to take a closer look. Please edit the first post on this ticket and include your WordPress & FTP logins in the designated Sensitive Data section.
Please do take a complete backup of your website before sharing the information with us.
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.
I replaced your code with
<?php
add_action( 'wp_head', 'rankmath_disable_features',1);
function rankmath_disable_features() {
if (strpos($_SERVER['REQUEST_URI'], "/places/") !== false){
remove_all_actions( 'rank_math/head');
}
}
?>
and it works, but it still stops my custom page title from working – gets replaced with just the url
Hello,
When you disable all Rank Math’s features on a certain page, your theme is now taking over in generating the title of your page.
Could you please try switching to a different theme such as the default theme “Twenty-twenty”? See if the issue goes away.
Looking forward to helping you with this one.
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.