WordPress.org

Ready to get started?Download WordPress

Forums

Native gallery ordering problem with custom post type (1 post)

  1. roowilliams
    Member
    Posted 2 years ago #

    In my theme I am inserting a media upload field for my 'project' custom post type using this in functions.php:

    function my_meta_box_cb() {
      	add_meta_box( project . '_details' , 'Media Library', 'my_meta_box_details', project, 'normal', 'high' );
    }
    function my_meta_box_details () {
      	global $post;
        $post_ID = $post->ID; // global used by get_upload_iframe_src
      	printf( "<iframe frameborder='0' src=' %s ' style='width: 100%%; height: 400px;'> </iframe>", get_upload_iframe_src('media') );
    }

    It works great, and I have a slideshow pulling all the images on the gallery tab, except I can't order them!

    I can drag and drop the order, and the action field number of each image corresponds with how the new order should be but when I click update it is lost, and no order is saved.

    Can anyone shed some light on this, because I am completely stuck!

    I've been plugging away all day at this and I'm tired so if anything doesn't make sense please forgive me, just let me know and I will explain.

    Thank you

    - Roo

Topic Closed

This topic has been closed to new replies.

About this Topic