Hello,
Thank you for contacting Rank Math and bringing your concern to our attention.
You can force the OpenGraph and meta tags of those versions of your site using these filters:
https://rankmath.com/kb/filters-hooks-api-developer/#metadata
https://rankmath.com/kb/filters-hooks-api-developer/#change-opengraph-url
I hope that helps.
Thank you, and please don’t hesitate to contact us anytime if you need further assistance with anything else.
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
Hello,
The filter returns the actual URL of the og:url
tag. You can simply assign a value to the $url
variable and it should change the og:url
tag on the frontend.
You can do it so like this:
add_filter( 'rank_math/opengraph/url', function( $url ) {
$url = "https://google.com/";
return $url;
});
As for your sitemap issue, please follow the steps to flush the sitemap cache:
1. Flush the Sitemap cache by following this video screencast:
https://i.rankmath.com/pipRDp
2. Exclude the Sitemap files of the Rank Math plugin in your caching plugin. The cache could be via a plugin or from the server. For plugins or Cloudflare, please follow this article:
https://rankmath.com/kb/exclude-sitemaps-from-caching/
Let us know how that goes. Looking forward to helping you.
I tried that for the Sitemap but did not work.
Any way to force RAnkmath to use a different base URL for the sitemaps?
Hello,
I have updated the sensitive data as requested. Can you please check further?
Thank you.
added some information to the private message section
Hello,
The base URL that we use for the sitemap is from calling the WP Rewrite class to get the website URL and whatever is returned there is added as the sitemap domain name.
There’s no way to change that via filters and you can only add a base URL after that but the actual domain name.
Hope this helps clarify your doubts.
Don’t hesitate to get in touch if you have any other questions.
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.