• Resolved amedic

    (@amedic)


    Hello,

    how to filter posts that has Facebook image?
    It is easy to filter for featured image:

    'meta_query' => array(
        array(
        'key' => '_thumbnail_id',
         'compare' => 'EXISTS'
    )

    But how to filter it for posts that have Facebook image?

    Also, how to get that image in php with post ID?

    Thank you.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support amboutwe

    (@amboutwe)

    The Facebook image is stored in different places depending on the post/page setup.

    The image is added in this hierarchy:

    1. Custom image set in meta box. Stored in postmeta as _yoast_wpseo_opengraph-image
    2. Featured image. Stored using default WordPress method.
    3. Image on post/page. Stored using default WordPress method.
    4. Default image. Stored in options as part of wpseo_social
    Thread Starter amedic

    (@amedic)

    @amboutwe thank you for the reply.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘meta_query filter posts that has Facebook image?’ is closed to new replies.