Media Categories

Download: Media Categories – WordPress Plugin Directory

This plugin allows users to assign categories to items in their Media Library with a clean and simplified, filterable version of the standard category meta box. The filter allows you to narrow your search for category as you type – this filter is not native to WordPress but is instead borrowed from Jason Corradino’s Searchable Categories plugin. If you would like to enable this feature for your posts and pages download his plugin here.

I’d like to point out that I drew some inspiration from the ‘WOS Media Categories’ plugin which is not generally easy to find since its not in the plugin directory. However WOS Media Categories was missing the clean simple to use hierarchical category interface that we are used to in WordPress. A couple of my projects were dependant that plugin, but as the scale of the project increased and the number of categories grew exponentially, the disorganized grid of checkboxes were no longer a viable option.

As stated above, the filtering ability in this plugin is taken from Jason Corradino’s Searchable Categories plugin. While I do not employ the plugin directly, the javascript used for filtering is in fact derived, with consent, from that plugin. To enable this feature on all your category metaboxes, install the Searchable Categories plugin

Checkout these related plugins from which I borrowed code and drew inspiration.

Screenshots:

This plugin will include clean, simple to use, filterable categories to your Media Editor page.

This plugin will include clean, simple to use, filterable categories to your Media Editor page.

Use categories in much the same way you use them on your posts and pages.

Use categories in much the same way you use them on your posts and pages.

Filter categories as you type, very useful if you have a lot of categories to look through (thanks to Jason Corradino's "Searchable Categories" plugin)

Filter categories as you type, very useful if you have a lot of categories to look through (thanks to Jason Corradino's "Searchable Categories" plugin)


16 Comments on “Media Categories”

  1. Michiel says:

    Hi Eddie,

    I think your plug in is just what I have been looking for, but to be sure I miss one bit of info.

    Since with your plugin the images can be given a category, would it also be possible to use this in the std gallery? so e.g. [gallery category=123]

    reason i ask is because I’ve created a site where users can post images together with a story.
    these images are uploaded to a defined folder, on a different page then these posts i want to have a categorised image gallery.

    at this moment it is still an option to manually select and add pictures to the gallery, but I was thinking that IF the std gallery can pickup the cat’s it would be an automated system.

    hope you can provide answer to this.
    thx Chiel

    • eddiemoya says:

      Hey Michiel,

      I have not added any such functionality with this plugin, it does do anything but let you categorize attachments. When I built this, I did so because I saw a basic need to make such an interface available for developers. As a developer, I filter for the attachments directly via the themes I build, the way I’ve done for K-Mart Fashion Lookbooks (example lookbook so I had not thought to add support for a shortcode argument.

      I don’t know if your a developer, but if you are you’ll probably have to build that yourself right now. While writing this I looked into it, and it shouldn’t be too hard, basically copy the gallery_shortcode() function in wp-includes/media.php:line 758, change the shortcode atts the handle ‘category’, and then change the get_posts function to pass the category parameter.

      If your not a developer, sorry. You’ll have to wait, or find another plugin that allows galleries to by shown based off category.

      This is something I’ll probably (more like certainly) add to the plugin a some point because it is a good idea, so thank you for that, but I just don’t have the time right now. I might start looking at the problem over the weekend but I can’t make any promises.

      • Michiel says:

        Hi Eddie,
        I have been working with html for quite a while, but haven’t looked in depth to wp-plugins, think this is a great moment to start doing so 😉 thanks for the hunch where to look, i’ll give it a shot.

  2. Arthur says:

    /?page_id=projects does not work: WP screahes since 3.0 only for the ID in Numbers, Words are not accepted due some Securiy Problems that are comming with alowing direct words, such as SQL injections.

    • eddiemoya says:

      I’m not sure how this relates to the Media Categories plugin, however you can pass slugs in the following manner:

      /?pagename=projects

      If you have a ‘Page’ named projects, this will be parsed by your rewrite rules, depending on your permalink structure, it will be changed to the proper url automatically.

  3. […] I’m developing a very media-centered site with WordPress and am using the default categories and tags on uploaded media using, in part this plugin Media Categories. […]

    • eddiemoya says:

      I’m sorry that I did not notice your post sooner – the trackback got caught by the spam filter.

      I’ve actually been struggling with the same problem – the difficulty your having in getting the submenu to work is precisely the reason that its not part of the plugin, I simply haven’t found an easy way to do this.

      Eventually I think I’ll have to write my own subpages to solve it i simply have not had time to do that.

  4. Samuel says:

    How to display categories name on attachtment?

  5. dhyar says:

    How to display categories name on attachment page? Is it can?

  6. simi says:

    Hello,

    Basically the categories created are all together with the categories for blog posts. I mean they can’t be separated from those categories, when you search for a picture just to see media categories and not blog categories.

    • eddiemoya says:

      What your saying is incorrect – you are able to separate, and you are able to use other taxonomies. Its just that doing any of those things requires some level of coding.

      For adding additional taxonomies that already exist, its just one line. To have search results separate posts from media, it requires a bit of code, but it should all be using built-in core wordpress functions. Depends on what exactly you need to do.

      It would be easier to point you in the right direction if you could please ask a specific question.

  7. Maria Ramos says:

    Good day,

    I’m Maria Ramos from WebHostingHub Support. We have found your Media Categories plugin at https://eddiemoya.com/plugins/media-categories-wordpress-plugin/ very interesting and we would like to translate it to Spanish language to help people from Hispanic community. Would that be ok with you?

    I hope I’ll hear from you soon.

    Kind regards
    Maria Ramos
    WebHostingHub Support

    • eddiemoya says:

      Maria,

      I would be very happy to work with you to have my plugins translated. I am actually a native Spanish speaker myself (my mother is from Puerto Rico, my father is Chilean). Please let me know what you will need from me to make this happen.

      Thanks,
      Eduardo Javier Moya


Leave a comment