Hello Nitish,
Thanks for reaching out regarding your open graph image. Can you let us know what you are trying to achieve with the filter?
Hello Maybellyne,
Thank you for your quick response.
I have one custom post type and I want to add og:image for those posts which post content doesn’t have an image and featured image. Seem like the Yoast Seo plugin doesn’t include the og:image meta if the post does not have a featured image and the post content does not contain any image. In this case, I want to set og:image using the wpseo_opengraph_image filter. But this filter is not working due to the filter not executing.
Hi @kailanitish90
We understand you’ve tried to implement the wpseo_opengraph_image filter but it isn’t executing because your custom post type doesn’t have a featured image or image in the content itself.
We’re not sure how you’ve implemented the filter, but we do know that filter in the Metadata API should be working.
Otherwise, this is outside of our scope of support and is more of a technical issue with the implementation of the filter. If it is a legitimate bug, we recommend logging a bug report here – https://yoast.com/help/how-to-write-a-good-bug-report/
Thank you @mikes41720 for your reply. I think the bug has already reported on the github side.
https://github.com/Yoast/wordpress-seo/issues/15721
Hi @kailanitish90
Thanks for providing this issue (I wasn’t able to check on this) as it looks like it’s been confirmed by our developers in the comment here.
If you haven’t yet, please do subscribe to the GitHub issue for updates. Thank you.
We are going ahead and marking this issue as resolved due to inactivity. If you require any further assistance please create a new issue.