Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Reply To: [Assigned] How to exclude categories from dropdown

$
0
0

Hi Nolan,

As you mentioned above it is not possible within Views yet, currently I suggest you try create a javascript to hide the options in the dropdown menu, for example:
your dorpdown menu is using html name "wpvcategory", you are going to hide options with value "ca1" and "ca3", please try edit your view, in section "Filter HTML/CSS/JS", click "Close JS editor" button, add below codes:

jQuery(function($){
  var arr=['ca1', 'ca3'];
  $('select[name="wpvcategory"] option').each(function(){
    if(jQuery.inArray($(this).val(), arr)>=0){
        $(this).hide();
    }
  });
})

Viewing all articles
Browse latest Browse all 20145

Trending Articles