Title: Default selection
Last modified: July 3, 2017

---

# Default selection

 *  Resolved [kamtcho](https://wordpress.org/support/users/kamtcho/)
 * (@kamtcho)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/)
 * Hallo, how can i make a default selection Instead filter by to:
    Not in category.
 * Could you please give me hint what edit, even in core file.
 * Thank you very much.
 * Martin

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

 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9289921)
 * Hello Martin,
 * Sorry, your question is not clear to me. Can you please describe your need in
   more details? What do you mean by “default selection”?
 * Best,
    -Nadia
 *  Thread Starter [kamtcho](https://wordpress.org/support/users/kamtcho/)
 * (@kamtcho)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9290025)
 * Thanks for reply,
 * By defauld, in media libraly when install your script i have all images,
 * i would like have selected by defalt: –NOT IN MEDIA CATEGORY–
 * Thank you for help.
 * Sincerely Martin.
 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9290293)
 * I see now, thanks. The simple solution exists for the grid mode and media popups:
 *     ```
       $( document ).ready( function() {
           $('#media-attachment-media_category-filters').val('not_in').change();
       });
       ```
   
 * For the list mode things get complicated.
 * Best,
    -Nadia
 *  Thread Starter [kamtcho](https://wordpress.org/support/users/kamtcho/)
 * (@kamtcho)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9290327)
 * Grid mode is enough for me.
 * Please what file to edit?
 * I tryed edit:
    eml-media-grid.js eml-medialibrary-options.js
 * but no success.
 * COuld you hint me a little.
 * Thank you for you time.
 * Martin
 *  Thread Starter [kamtcho](https://wordpress.org/support/users/kamtcho/)
 * (@kamtcho)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9290397)
 * To make it clear what i would need, i am adding img:
 * ![the red circle](https://i0.wp.com/kachliar.sk/enhanced-media.jpg)
 * thank you for your time.
 * Sincerely Martin
    -  This reply was modified 8 years, 10 months ago by [kamtcho](https://wordpress.org/support/users/kamtcho/).
    -  This reply was modified 8 years, 10 months ago by [kamtcho](https://wordpress.org/support/users/kamtcho/).
 *  Thread Starter [kamtcho](https://wordpress.org/support/users/kamtcho/)
 * (@kamtcho)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9290443)
 * or this will be also OK:
 * ![or this red ](https://i0.wp.com/www.kachliar.sk/enhanced-media1.jpg)
 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9292438)
 * Martin,
 * You should add a JS file with this custom code to your theme folder, for example:
 *     ```
       ( function( $ ) {
           $( document ).ready( function() {
               $('#media-attachment-media_category-filters').val('not_in').change();
           });
       })( jQuery );
       ```
   
 * You should also enqueue the script in your theme functions.php like this:
 *     ```
       add_action( 'wp_enqueue_scripts', 'YOUR_PREFIX_enqueue_scripts' );
   
       function YOUR_PREFIX_enqueue_scripts() {
           wp_enqueue_script( 'eml-customization', get_template_directory_uri() . '/eml-customization.js' );
       }
       ```
   
 * Best,
    -Nadia
 *  Thread Starter [kamtcho](https://wordpress.org/support/users/kamtcho/)
 * (@kamtcho)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9296084)
 * Hallo,
 * i tryed create file:
 * not_in_c.js
 * put this file into my theme folder. Put into file the first code you posted.
 * The second code i put into functions.php and changed:
 *     ```
       add_action( 'wp_enqueue_scripts', 'not_in_c_enqueue_scripts' );
   
       function not_in_c_enqueue_scripts() {
           wp_enqueue_script( 'not_in_c', get_template_directory_uri() . '/not_in_c.js' );
       }
       ```
   
 * Is prefilx same as first part of created js.file?
    And this way it now work for
   me.
 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9296258)
 * Martin,
 * The prefix is totally up to you. Glad to know you have managed to make it work.
 * Best,
    -Nadia
 *  Thread Starter [kamtcho](https://wordpress.org/support/users/kamtcho/)
 * (@kamtcho)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9297387)
 * Hallo,
    unfortunatelly, it does not work for me. Still same. All images i see.
 * I was little confused, so I though that something with prefix i made wrong.
 * Sincerely Martin
 *  Plugin Author [webbistro](https://wordpress.org/support/users/webbistro/)
 * (@webbistro)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9297907)
 * Hello Martin,
 * Sorry,
 * (1) better use `$(window).on( 'load', function(){} );`
 *     ```
       ( function( $ ) {
   
           $( window ).on( 'load', function() {
               $('#media-attachment-media_category-filters').val('not_in').change();
           });
       })( jQuery );
       ```
   
 * (2) should be `admin_enqueue_scripts`
 *     ```
       add_action( 'admin_enqueue_scripts', 'not_in_c_enqueue_scripts' );
   
       function not_in_c_enqueue_scripts() {
           wp_enqueue_script( 'not_in_c', get_template_directory_uri() . '/not_in_c.js' );
       }
       ```
   
 * Best,
    -Nadia
 *  Thread Starter [kamtcho](https://wordpress.org/support/users/kamtcho/)
 * (@kamtcho)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9297933)
 * Hallo,
 * now it works like a charm.
 * Thank you very much for your time.
 * All the best.
 * Sincerely Martin

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

The topic ‘Default selection’ is closed to new replies.

 * ![](https://ps.w.org/enhanced-media-library/assets/icon-256x256.png?rev=980107)
 * [Enhanced Media Library](https://wordpress.org/plugins/enhanced-media-library/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enhanced-media-library/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enhanced-media-library/)
 * [Active Topics](https://wordpress.org/support/plugin/enhanced-media-library/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enhanced-media-library/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enhanced-media-library/reviews/)

 * 12 replies
 * 2 participants
 * Last reply from: [kamtcho](https://wordpress.org/support/users/kamtcho/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/default-selection/#post-9297933)
 * Status: resolved