Custom Fields
Re-Envisioned
Support MB Relationships Get post thumbnail connect relationship

  • Creator
    Topic
  • #27822
    Resolved Thibaut
    Participant

    Hello,

    how to get the featured image of the post from this code? I changed to echo $p->post_thumbnail; but doesn't work.

    Thank you

    $pages = MB_Relationships_API::get_connected( [
    'id' => 'posts_to_pages',
    'from' => get_the_ID(),
    ] );
    foreach ( $pages as $p ) {
    echo $p->post_title;
    }

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