Support › General › Show advanced image by post IDResolved
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?
The code to get a field from a post ID should be
$images = rwmb_meta( 'photo', array( 'limit' => 1 ), 123 );
For more information, please follow the documentation
so simple! Thanks 🙂