herrschuessler
Member
Posted 3 months ago #
The ability to sort plupload_images in the admin area by drag and drop is very nice, but how do I get the images in the sorted order in the front end?
Using either
$images = rwmb_meta( 'my_image', 'type=image', $post->ID );
or
$images = get_post_meta( $post->ID, 'my_image', false );
returns the images in upload order.
http://wordpress.org/extend/plugins/meta-box/
Have you found a solution to your question? I'm looking for something similar.
Here is a link to the developers forum that seems to request the same with a solution that I cant seem to implement
I got mine sorted by using
<php
//Using this to get the post ID so that I can group the images with their own entry since I display multiple entries on one page
$post_id = get_post_meta(get_the_ID(), 'equipment_images', false);
$excagriqID = get_the_ID();
$images = rwmb_meta( 'equipment_images','type=image');
echo "<div class='equipment-images'>";
foreach ( $images as $image )
{
echo "<div class='equipment-image'><a href='{$image['full_url']}' title='{$image['title']}' rel='". $excagriqID ."' class='thickbox'><img src='{$image['url']}' width='{$image['width']}' height='{$image['height']}' alt='{$image['alt']}' /></a></div>";
}
?>