• Resolved takeok

    (@takeok)


    Seems like this would be a great simple solution except that it’s using the same taxonomy as Posts. So all my post categories show up in my media categories and vice versa.

Viewing 1 replies (of 1 total)
  • Plugin Author jeffrey-wp

    (@jeffrey-wp)

    Hi TakeOk, as described in the faq:

    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 for the WordPress Media Library add this code to the file functions.php located in your theme or child-theme:

    /**
    * separate media categories from post categories
    * use a custom category called 'category_media' for the categories in the media library
    */
    add_filter( 'wpmediacategory_taxonomy', function(){ return 'category_media'; } ); //requires PHP 5.3 or newer
    

    Or if you have an older PHP version:
    add_filter( 'wpmediacategory_taxonomy', create_function( '', 'return "category_media";' ) ); //requires PHP 4.0.1 or newer

Viewing 1 replies (of 1 total)
  • The topic ‘Same Taxonomy as Post Category?’ is closed to new replies.