Support » Requests and Feedback » Filter media library by file type

  • It would be useful to filter the media library by file type. The search feature does not seem to do this. For example, I have jpg, gif, and pdf files and would like to just see the pdf files.

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

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    πŸ³οΈβ€πŸŒˆ Plugin Review Team Rep

    It sorts them by mime type but it looks like .pdf is considered an image. Well that’s interesting!

    You can add this piece of puzzle into your theme’s function.php file:

    function modify_post_mime_types($post_mime_types) {
        $post_mime_types['application/pdf'] = array(__('PDF'), __('Manage PDF'), _n_noop('PDF <span class="count">(%s)</span>', 'PDF <span class="count">(%s)</span>'));
        return $post_mime_types;
    }
    add_filter('post_mime_types', 'modify_post_mime_types');

    Works for me.

    Thread Starter pastorjim

    (@pastorjim)

    Works nicely. Thanks!!

    juan75

    (@juan75)

    it’s possible to group mime types in one tab? i tried in several ways without success!

    Beautiful πŸ™‚

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Filter media library by file type’ is closed to new replies.