• Resolved albyse

    (@albyse)


    Hi, we are using your plugin. we need your help.

    In our site, we have opengraph default image setting from Rank math plugin. And in posts, We have parent posts and child posts. We need to display the same OG image set for the parent in its children posts if child post is not set their own OG image. Can you please share the hook used for it and how we can do it?

    Please reply soon

    Thank you

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @albyse,

    Thank you for contacting Rank Math support.

    You can use the following filter to change the OG image in the front end: https://rankmath.com/kb/filters-hooks-api-developer/#change-opengraph-image

    We save the OG image URL in the rank_math_facebook_image meta key. You can use it to check if the image is set for the child post, get the image URL from the same meta key of the parent post, and use it as the OG image for the child post.

    Hope that helps and please do not hesitate to let us know if you need our assistance with anything else.

    Thread Starter albyse

    (@albyse)

    Hi, can we change the OG image in the backend using above filter for the same condition: display the same OG image set for the parent post in its children posts if child post is not set their own OG image

    Plugin Support Rank Math Support

    (@rankmathsupport)

    Hello @albyse,

    No, this filter only runs in the frontend so it cannot be used to make changes to the backend of the website.

    Don’t hesitate to get in touch if you have any other questions.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Customize OG Image’ is closed to new replies.