• Resolved jitka88

    (@jitka88)


    Hi,

    I was trying to resolve this on few sites – is there any simple (even the code-way) way, how to force one picture on complete site as social preview image? No matter of the featured images of the posts, pages, CPT… I would like to set up only one image and have it as social preview image everytime.

    Is it possible?

    Thank you

    J.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jitka88

    (@jitka88)

    PS: sorry, I solved it by on of your documented actions.

    Thanks!

    J.

    Plugin Support Rank Math Support

    (@rankmathteam)

    Hello @jitka88,

    Thank you for contacting Rank Math support.

    Glad you got it sorted.

    Just documenting it here for other users. To force the use of the default/fallback opengraph image everywhere, you may need to use this filter:
    add_filter('rank_math/opengraph/pre_set_content_image', function() { return true; });

    And here’s a guide on how you can add the filter to your site:
    https://rankmath.com/kb/filters-hooks-api-developer/

    Once done, the image you have set on your WordPress dashboard > Rank Math > Titles & Meta > Global Meta > Opengraph Thumbnail will be used on all of your website pages’ social images.

    Hope that helps.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Force Social preview image on complete site’ is closed to new replies.