Custom Fields
Re-Envisioned
Support General Show advanced image by post ID

  • Creator
    Topic
  • #19600
    Resolved JeanROUSTAN
    Participant

    hi,
    i have a custom post type ‘stock’ with an advanced image field named ‘photo’.
    I need to display the first image of my cpt (id=123) in a specific page.
    i’ve tried this, but this doesn’t work

    $images = rwmb_meta( 'photo', array( 'limit' => 1,'ID' => 123) );
    $image = reset( $images );
    

    Is it possible to do this ? if so, how?

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.
grid gear info copy caret-up caret-down trash