Hello,
Thank you for contacting us and sorry for any inconvenience that might have been caused due to that.
You can use the following filter to change the robots settings for the embed
pages like so:
add_filter( 'rank_math/frontend/robots', function( $robots ) {
$url = 'https://' . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"];
if(strpos($url, 'embed')) {
$robots["index"] = 'noindex';
$robots["follow"] = 'nofollow';
}
return $robots;
});
​​​​​​​Hope this helps solve your issues.
Don’t hesitate to get in touch if you have any other questions.
This function doesn’t works for me!!
Please note “no-index went up from embed page automatically when I activated rank math”.
This function is for changing robots content!! If there is no robots meta tag how can this function change or replace it?
and why rank math removing this tag from /embed page? Which is default by wordpress!!
<meta name='robots' content='noindex,follow' />
I think it’s rank math bug.
Hello,
We might need to take a closer look at the settings. Please edit the first post on this ticket and include your WordPress 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.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Please check the Sensitive Data!!
Hello,
I was able to replicate this on my end. Allow me to check this one with our developers. You should hear an update or a solution from us shortly.
In the meantime, please don’t hesitate to contact us anytime if you need our assistance with anything else.
You can do it. But, You must notify me before making any changes to other plugins, themes, etc.
Hello,
We were able to reproduce the error and have logged it. Please allow us some time to test and release a fix. It should be added to the plugin in the upcoming update.
You can keep an eye on the changelog and we will be mentioning this error when fixed.
For now, to fix the issue on your site I wanted to make some changes in the plugin files but the username, the password you added in the Sensitive Data Section is not working.
Please try changing the following code:
https://github.com/rankmath/seo-by-rank-math/blob/master/includes/frontend/class-head.php#L73
to:
if ( ! is_embed() ) {
remove_all_filters( 'wp_robots' );
}
This should fix the issue.
I hope that helps. Please let us know if you need any further assistance.
Thank you.
I can the issue by following your instruction. But, you should fix it on update.
Thank you for your quick response.
Hello,
We are glad that we could address your issue.
We will bring an update with this fix soon. You may keep an eye on our changelog page for further updates with regards to this issue: https://rankmath.com/changelog/
In the meantime, please don’t hesitate to contact us anytime if you need our assistance with anything else.