Hello,
Thank you for contacting Rank Math and bringing your concern to our attention.
You may need to customize the filter further to update the og:type meta tag on single page like this one:
add_filter('rank_math/opengraph/type', function ($type) {
if ( is_singular('page')) {
$type = 'website'; //change to the type you want to use
}
return $type;
});
Here is how to add a filter to your site: https://rankmath.com/kb/wordpress-hooks-actions-filters/
Hope that helps.
Hey, what do you mean? your tutorial says that script works, but it doesn’t work.
Hello,
The filter doesn’t enable an option to select the OG Type. It only allows you to change the OG Type in the meta tags. You will have to define a type in the filter as shown in the example shared by my colleague to make it work.
Please do not hesitate to let us know if you need our assistance with anything else.
Ok, is there an extension that can be used together with Rank Math to manage this without code?
if not, is it possible to disable og data in rank math so I can use another plugin to set them?
Hello,
Unfortunately, there’s no other option to show it in the editor to manage it without using the code.
However, if you want to use a different plugin for handling the og:type meta tag on your site, you may need to add this code to disable it from Rank Math:
/**
* Filter to disable Rank Math og:type
*
* */
add_filter( 'rank_math/opengraph/type','__return_false');
Looking forward to helping you.
Hello,
Glad that helped.
If you have any other concerns, please don’t hesitate to contact us anytime so we can assist you further.
Looking forward to helping you.