Media Library Categories - Premium
Adds the ability to use categories in the media library. When activated a dropdown of categories will show up in the media library. You can change the category of multiple items at once with bulk actions.
Features
- add / edit / remove categories from media items
- change the category of multiple items at once with bulk actions
- filter on categories in the media library
- filter on categories when adding media to a post or page
- filter on categories when creating galleries in the media library
- filter on categories when using the gallery shortcode, for example [gallery category='my-category-slug']
- taxonomy filter
Installation
For a manual installation via FTP:
- Upload the 'wp-media-library-categories' directory to the '/wp-content/plugins/' directory
- Activate the plugin through the 'Plugins' screen in your WordPress admin area
- A dropdown of categories will show up in the media library
To upload the plugin through WordPress, instead of FTP:
- Upload the zip file 'wp-media-library-categories-installable.zip' on the 'Add New' plugins screen (see the 'Upload' tab) in your WordPress admin area and activate.
- Activate the plugin through the 'Plugins' screen in your WordPress admin area
- A dropdown of categories will show up in the media library
Automatic Updates
Use Envato Market WordPress plugin to get automatic updates, with a single click, directly from WordPress. Upon a new release, get notified directly from your Wordpress Dashboard. Update the plugin from the Dashboard Plugins with the automated Wordpress functions. Always use the latest version for the best compatibility!
FAQ
How to use separate categories for the WordPress Media Library (and don't use the same categories as in posts & pages)?
By default the WordPress Media Library uses the same categories as WordPress does (such as in posts & pages). If you want to use separate categories you can use a custom taxonomy, this can be set under Settings → Media (or click on the settings quicklink on the WordPress plugins overview page).
How to use category in the [gallery] shortcode?
To only show images from one category in the gallery you have to add the 'category' attribute to the [gallery] shortcode.
The value passed to the 'category' attribute can be either the category slug or the term_id, for example with the category slug:
[gallery category="my-category-slug"]
Or with term_id:
[gallery category="14"]
If you use an incorrect slug by default WordPress shows the images that are attached to the page / post that is displayed. If you use an incorrect term_id no images are shown. Aside from this behavior, the [gallery] shortcode works as it does by default with the built-in shortcode from WordPress (see the WordPress gallery shortcode codex page). If you only want to show attachments uploaded to the page and filtered by category than use the 'id' in combination with the 'category' attribute. For example (the id of the post is 123):
[gallery category="my-category-slug" id="123"]
Or leave id empty for current page / post:
[gallery category="my-category-slug" id=""]
In this example the slug is used, but you could also use the term_id.
Can I upgrade from the free version to the premium version without problems?
Yes, you can delete the free version and then install the premium version. All assigned categories will be remembered.
Changelog
2.8.2
- Fix -Not in a category- option when filtering default categories.
2.8.1
- Fix 'jQuery.fn.load() is deprecated' warning.
- Remember selected category in dropdown when filtering default categories.
2.8.0
- Add filter option "not in a category".
- Remember selected category in dropdown when filtered.
2.7.3
- Fix text in delete button on bulk select page.
- Add fix for JavaScript cache issue.
2.7.2
- Fix Javascript in featured image window.
2.7.1
- Fix JavaScript warning after upload in media grid view.
2.7
- Add autocomplete search to the category dropdown in the Media Library (which can be turned on under Settings → Media).
- Add usability fix to highlight media library settings section when directly linked.
2.6.1
- Fix taxonomy checkbox on media modal (when using custom taxonomy).
- Fix some translation strings.
2.6
- Add interface (located under Settings → Media) to separate the media categories from the default WordPress categories.
2.5
- Add WordPress 5.3 compatibility.
2.4.3
- Improve upgrade progress for servers that use extreme caching.
2.4.2
- Re-enable assigning categories to images inside media popup.
2.4.1
- Fix JavaScript error in the Media Library grid view.
2.4
- Add Elementor Page Builder plugin support.
- Add support for multiple slugs and id's in gallery shortcode.
2.3
- Support for WordPress 5.0 and Gutenberg.
2.2
- Rewrite entire plugin to improve quality and make it ready for future development.
- Notice for first time users how to separate media categories.
- Support for SCRIPT_DEBUG.
- Only load CSS when needed.
- Move language files to GlotPress.
2.1.6
- Remember pagenumber when using bulk actions.
- Only use wp_safe_redirect instead of wp_redirect.
- Better detection if category is empty in gallery shortcode.
- Use id attribute in gallery shortcode and show attachments in selected category and uploaded to post ID. [gallery category="my-category-slug" id="123"]
- Leave id attribute empty in gallery shortcode to show attachments in selected category and upload to current post. [gallery category="my-category-slug" id=""]
2.1.5
- Before creating custom taxonomy check if taxonomy exists.
- Use filter instead of action for the displayed attachments.
- On some servers the active category was not selected in the dropdown in media list view.
- Fixed notice "Undefined index: ids" which in some rare cases would appear.
- Support PHP 7.1
- Support for GlotPress
- Support for WordPress 4.7
2.1.2
- Support for WordPress 4.4
- Fix compatibility with Advanced Custom Fields and some other plugins.
2.1.1
- Support for WordPress 4.2
- Security enhancement for add_query_arg XSS.
- Remember selected category.
2.1.0
- Support for WordPress 4.1
- Add category checkboxes to attachment details on insert media popup.
2.0.9
- Support for WordPress 4.0
- Added categories filter to media grid view.
- Security enhancement.
- Resolved conflict with UberMenu plugin.
2.0.8
- Improved compatibility with other plugins that use the [gallery] shortcode.
- Remember author when changing categories.
- Added example code in the FAQ for creating seperate categories with PHP 4. Read here for a howto
2.0.7
- Added support for category to the default WordPress shortcode gallery. Read here for a howto
- Remember ordering when changing categories.
- Improved code styling to match WordPress code standard even more strictly.
2.0.6
- Stay on active page in the media library when changing categories.
2.0.5
- Added hierarchical display of the filter menu when inserting media.
- Fixed PHP 5.4 strict warning.
2.0.4
- Fixed alignment of filter for custom categories in WordPress 3.9
2.0.3
- Fixed error message which in some cases appears when updating multiple items at once.
2.0.2
- Fixed media count on the categories page.
- Added item count in the category filter dropdown when using separate categories for the WordPress Media Library.
- Support for WordPress 3.9
2.0.1
- New images are now added to the default category (if a default category exists). In most cases the default category is "Uncategorized".
2.0
- By default the WordPress Media Library uses the same categories as WordPress does (such as posts & pages). Now you can use separate categories for the WordPress Media Library. Read here for a howto
- Fixed bug where in some rare cases the filter by category didn't work
Before 2.0
- Category options & management in the Media Library
- Category filter when inserting media
- Category filter when creating galleries
- Taxonomy filter
- Support for bulk actions (to add / change or remove categories from multiple media items at once)
- Internationalisation
- Extensive documentation