• Resolved Li-An

    (@li-an)



    Hello (again),
    I don’t want the featured image to be used in og:image. In All in One SEO and SEOPress, it’s possible to define what to show by default but I did not find for Rank Math.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author MyThemeShop

    (@mythemeshop)

    Hello @li-an,

    Thank you for contacting the support.

    Please open the setup wizard by following this URL:
    wp-admin/admin.php?page=rank-math-wizard&step=yoursite

    and add your default OG image here:
    https://mythemeshop.d.pr/QKMq4O

    Hope that helps. If you have any further question(s), please let us know. Thank you.

    I did this but this image will be overridden by featured image and I do not want this behavior (featured images are supposed to be hidden to non members).

    Plugin Author MyThemeShop

    (@mythemeshop)

    Hello @li-an

    Can you please share the following things?
    1. URL where you are facing this issue
    2. Screenshot from this tab of that URL: https://mythemeshop.d.pr/jkIxf8

    Finally, can you please be more specific as to what is the expected behavior you are looking from the plugin? Be as detailed as you could with examples.

    Looking forward to helping you. Thank you.

    Hello, sorry not being clear enough.
    I need to define the define og:image as a default image I choose for ALL posts and not the featured image. I put a screenshot of All in One SEO where you can define what kind of image will be used.

    https://ibb.co/fv9H0nR

    Plugin Author MyThemeShop

    (@mythemeshop)

    Hello @li-an,

    Sorry for the confusion.

    Unfortunately, that is not possible with the current version of the plugin.

    But, we have added it in the plugin and an update will have a filter to stop that fallback.

    We seek your patience and understanding in this matter.

    If there is anything else you need a help with, please let us know.

    Thank you.

    Thanks for you quick answers. I will wait for the update.

    Plugin Author MyThemeShop

    (@mythemeshop)

    Hello @li-an,

    Thank you for your patience.

    We have added the filter in the latest version of the plugin to bypass all the conditions:
    add_filter( 'rank_math/opengraph/pre_set_featured_image', '__return_true' );

    That should help.

    Please let us know if you need any further assistance.

    We are here to help.

    P.S. Please do clear the cache before checking if the filter is working. It is best to test on a fresh article which should be published after updating to the latest version of the plugin.

    Thanks, I will have a look.

    OK, I’ve made some tests after copying your code in functions.php file.

    Condition : There is always a featured image.
    If there is no image in post content, og:image gives the URL of the default og:image
    Ir there is an image in post content, og:image gives the URL of the first image in content.

    Is it the expected behavior ? It should be OK for me as I don’t have any image in content in protected posts but it may be may an issue for sites with protected content.

Viewing 9 replies - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.