Title: Sortable admin column
Last modified: September 8, 2016

---

# Sortable admin column

 *  Resolved [Taro](https://wordpress.org/support/users/sicktb/)
 * (@sicktb)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/sortable-admin-column/)
 * Im trying to get the Thumbnails sorted. Some(most) of the thumbnails are not 
   loading and i have to press recover. But now i have to scroll tru 15 pages. I
   want to sort the “no image” with thumbnail on top.
 * I tryed the following, but its not working…:
 * add_filter( ‘my_sortable_ngg_page_content_column’, ‘my_sortable_ngg_page_content_column’);
   
   function my_sortable_ngg_page_content_column( $columns ) { $columns[‘column column-
   3’] = ‘column column-3’;
 *  return $columns;
    }

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Thread Starter [Taro](https://wordpress.org/support/users/sicktb/)
 * (@sicktb)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/sortable-admin-column/#post-8159403)
 * tryed the following but did not work:
 * add_filter( ‘manage_edit-nggallery-manage-gallery_sortable_columns’, ‘thumbnail_post_column’);
   
   function thumbnail_post_columnn( $columns ) { $columns[‘thumbnail’] = __(‘Thumbnail’,‘
   nggallery’);
 *  return $columns;
    }
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [9 years, 7 months ago](https://wordpress.org/support/topic/sortable-admin-column/#post-8164299)
 * [@sicktb](https://wordpress.org/support/users/sicktb/) – Looking at your example
   code neither of the hooks you are trying to use exist in NextGEN Gallery so any
   callback code used will not be applied. Aside from this, can you provide any 
   additional details on the sort issue you are having?
 * Thanks!
 * – Cais.
 *  Thread Starter [Taro](https://wordpress.org/support/users/sicktb/)
 * (@sicktb)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/sortable-admin-column/#post-8181410)
 * I’m trying to sort the thumbnail field from a gallerie “Manage Galleries”.
    I
   like it to sort the “broken” image first. When i upload new images to the folder
   and press scan folder all the thumbnails are broken. This is probably because
   i don’t use downsampling of the orignal image.
 * I can fix this by press ‘recover’ one by one. The bulk option is not working 
   for me.
 * [https://domain.com/wp-admin/admin.php?page=nggallery-manage-gallery&mode=edit&gid=1&_wpnonce=be5d9e8029](https://domain.com/wp-admin/admin.php?page=nggallery-manage-gallery&mode=edit&gid=1&_wpnonce=be5d9e8029)
 * This is the field i like to make sortable:
    ⌊Sort⌉
 * This are the settings:
 * Image Options: ⌊Image Options⌉
 * Thumbnail Options: ⌊Thumbnail Options⌉
    -  This reply was modified 9 years, 6 months ago by [Taro](https://wordpress.org/support/users/sicktb/).
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/sortable-admin-column/#post-8182265)
 * [@sicktb](https://wordpress.org/support/users/sicktb/) – The hooks available 
   for the manage galleries image list (based on the screen snippet) can be found
   within the following file:
    ../wp-content/plugins/nextgen-gallery/products/photocrati_nextgen/
   modules/ngglegacy/admin/manage-images.php
 * I would recommend trying to make your changes from those filters.
 * Thanks!
 * – Cais.
 *  Thread Starter [Taro](https://wordpress.org/support/users/sicktb/)
 * (@sicktb)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/sortable-admin-column/#post-8238855)
 * [@cais](https://wordpress.org/support/users/cais/).
 * I have been looking at the php file but it seems not to be working.
 *     ```
       add_filter( 'manage_edit-ngg_manage_images_columns', 'ngg_thumbnail_column' );
       function ngg_thumbnail_column( $columns ) {
       	$columns['thumbnail'] = 'thumbnail';
   
       	//To make a column 'un-sortable' remove it from the array
           //unset($columns['date']);
   
       return $columns;
       }
       ```
   
    -  This reply was modified 9 years, 6 months ago by [Taro](https://wordpress.org/support/users/sicktb/).
 *  Plugin Contributor [photocrati](https://wordpress.org/support/users/photocrati/)
 * (@photocrati)
 * [9 years, 6 months ago](https://wordpress.org/support/topic/sortable-admin-column/#post-8239000)
 * [@sicktb](https://wordpress.org/support/users/sicktb/) – `manage_edit-ngg_manage_images_columns`
   is not one of our hooks (as noted above). If you want to use a specific “hook”
   to do something it must exist first. In this case, there is no auto-generated
   hook like it appears you are trying to use, you are only left with the hooks 
   that do exist as referenced in the file above.
 * Thanks!
 * – Cais.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Sortable admin column’ is closed to new replies.

 * ![](https://ps.w.org/nextgen-gallery/assets/icon-256x256.png?rev=2083961)
 * [Photo Gallery, Sliders, Proofing and Themes - NextGEN Gallery](https://wordpress.org/plugins/nextgen-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/nextgen-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/nextgen-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/nextgen-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/nextgen-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/nextgen-gallery/reviews/)

## Tags

 * [admin](https://wordpress.org/support/topic-tag/admin/)
 * [column](https://wordpress.org/support/topic-tag/column/)
 * [nextgen](https://wordpress.org/support/topic-tag/nextgen/)
 * [sortable](https://wordpress.org/support/topic-tag/sortable/)
 * [thumbnail](https://wordpress.org/support/topic-tag/thumbnail/)

 * 6 replies
 * 2 participants
 * Last reply from: [photocrati](https://wordpress.org/support/users/photocrati/)
 * Last activity: [9 years, 6 months ago](https://wordpress.org/support/topic/sortable-admin-column/#post-8239000)
 * Status: resolved