Title: Adding support for attachment taxonomies &#8211; patch
Last modified: August 22, 2016

---

# Adding support for attachment taxonomies – patch

 *  Resolved [Ben Huson](https://wordpress.org/support/users/husobj/)
 * (@husobj)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/adding-support-for-attachment-taxonomies-patch/)
 * This plugin does;t currently support taxonomies registered to the attachment 
   post type – no “Taxonomy Order” menu item is added under “Media” in the admin.
 * To fix this:
 * 1. In `taxonomy-terms-order.php` plugin file, where the submenu pages are created,
   adjust to add support for attachment post type:
 *     ```
       if ($post_type == 'post')
       	add_submenu_page('edit.php', __('Taxonomy Order', 'tto'), __('Taxonomy Order', 'tto'), 'level_'.$options['level'], 'to-interface-'.$post_type, 'TOPluginInterface' );
       elseif ($post_type == 'attachment')
       	add_submenu_page('upload.php', __('Taxonomy Order', 'tto'), __('Taxonomy Order', 'tto'), 'level_'.$options['level'], 'to-interface-'.$post_type, 'TOPluginInterface' );
       else
       	add_submenu_page('edit.php?post_type='.$post_type, __('Taxonomy Order', 'tto'), __('Taxonomy Order', 'tto'), 'level_'.$options['level'], 'to-interface-'.$post_type, 'TOPluginInterface' );
       ```
   
 * 2. In `include/interface.php` plugin file, where the post type is set based upon
   getting the URL parameter, also check if it the media page:
 *     ```
       $post_type = isset($_GET['post_type']) ? $_GET['post_type'] : 'post';
       if ( 'to-interface-attachment' == $_GET['page'] ) {
       	$post_type = 'attachment';
       }
       ```
   
 * Hope that is useful – would be great if it could be patched in the plugin.
 * 🙂
 * [https://wordpress.org/plugins/taxonomy-terms-order/](https://wordpress.org/plugins/taxonomy-terms-order/)

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

 *  Plugin Author [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * (@nsp-code)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/adding-support-for-attachment-taxonomies-patch/#post-5916854)
 * Thanks Ben, we will include this in the next version.
 * Thank you
 *  Thread Starter [Ben Huson](https://wordpress.org/support/users/husobj/)
 * (@husobj)
 * [11 years, 1 month ago](https://wordpress.org/support/topic/adding-support-for-attachment-taxonomies-patch/#post-5916878)
 * Great. Thank you 🙂
 *  [paddelboot](https://wordpress.org/support/users/paddelboot/)
 * (@paddelboot)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/adding-support-for-attachment-taxonomies-patch/#post-5916998)
 * I need this too, please include in upcoming version, thanks!
 *  [paddelboot](https://wordpress.org/support/users/paddelboot/)
 * (@paddelboot)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/adding-support-for-attachment-taxonomies-patch/#post-5916999)
 * Unfortunately, the above solution does not work when we have more than 1 attachment
   taxonomy.
 *  Plugin Author [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * (@nsp-code)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/adding-support-for-attachment-taxonomies-patch/#post-5917001)
 * This is available since version 1.4.4

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

The topic ‘Adding support for attachment taxonomies – patch’ is closed to new replies.

 * ![](https://ps.w.org/taxonomy-terms-order/assets/icon-256x256.png?rev=1564412)
 * [Category Order and Taxonomy Terms Order](https://wordpress.org/plugins/taxonomy-terms-order/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/taxonomy-terms-order/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/taxonomy-terms-order/)
 * [Active Topics](https://wordpress.org/support/plugin/taxonomy-terms-order/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/taxonomy-terms-order/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/taxonomy-terms-order/reviews/)

## Tags

 * [attachment](https://wordpress.org/support/topic-tag/attachment/)
 * [taxonomies](https://wordpress.org/support/topic-tag/taxonomies/)

 * 5 replies
 * 3 participants
 * Last reply from: [nsp-code](https://wordpress.org/support/users/nsp-code/)
 * Last activity: [10 years, 11 months ago](https://wordpress.org/support/topic/adding-support-for-attachment-taxonomies-patch/#post-5917001)
 * Status: resolved