Hello,
Thank you for contacting Rank Math and sorry for any inconvenience that might have been caused due to that.
Try the same code without the ''
characters:
/**
* Filter to change the schema data.
* Replace $schema_type with schema name like article, review, etc.
* @param array $entity Snippet Data
* @return array
*/
add_filter( "rank_math/snippet/rich_snippet_VideoObject_entity", function( $entity ) {
$featured_img_url = get_the_post_thumbnail_url(get_the_ID(),'full');
return $entity['thumbnailURL'] = $featured_img_url;
return $entity;
});
Looking forward to helping you. Thank you.
​​​​​​​
Thank you for your reply
-I have tried same code you provided .but still i am facing the same issue
https://ibb.co/Q6jBGnX
Rich Result Test Link:
https://search.google.com/test/rich-results?utm_campaign=sdtt&utm_medium=code&id=k-cSLu6zVSS7VffDa-Vd_w
Thank you
Hello,
In that case, we might need to take a closer look at the settings. Please edit the first post on this ticket and include your WP logins in the designated Sensitive Data section.
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.
Hello,
I went to your site and fixed the code, for anyone that is looking for the code, here it is:
add_filter( "rank_math/snippet/rich_snippet_videoobject_entity", function( $entity ) {
global $post;
$featured_img_url = get_the_post_thumbnail_url($post->ID,'full');
$entity['thumbnailUrl'] = $featured_img_url;
return $entity;
});
Looking forward to help you.
Hello,
We are glad we could assist you.
Do you wish to close this thread?
If you have any further question(s), please let us know. Thank you.
Thank you for your support
thanks to me the code also works for me
Hello,
We are super happy that this resolved your issue. If you have any other questions in the future, know that we are here to help you.
If you don’t mind me asking, could you please leave us a review (if you haven’t already) on https://wordpress.org/support/plugin/seo-by-rank-math/reviews/#new-post about your overall experience with Rank Math? We appreciate your time and patience.
If you do have another question in the future, please feel free to create a new forum topic, and it will be our pleasure to assist you again.
Thank you.