WordPress.org

Ready to get started?Download WordPress

Forums

Meta Box
how to get plupload_image order? (4 posts)

  1. herrschuessler
    Member
    Posted 1 year 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/

  2. HaneD
    Member
    Posted 1 year ago #

    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

  3. HaneD
    Member
    Posted 1 year ago #

    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>";
      }
    ?>
  4. Cristhopher Riquelme
    Member
    Posted 11 months ago #

    With rwmb_meta('equipment_images','type=image');
    got the images in the order i gave in post edition.

    thanks...

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic