Forums Forums Search & Filter Pro check tree

Viewing 10 posts - 1 through 10 (of 13 total)
  • Trevor
    #41090

    I am not entirely sure what you mean by a Check tree, but I guess you mean that the categories are shown in a select box, with categories and sub-categories? And you somehow want to collapse/open these in sections? If you were able to show an example of what you have and what you want?

    Anonymous
    #41368
    This reply has been marked as private.
    Trevor
    #41376

    It is an idea we could investigate, but it is not possible in the current version.

    Ross Moderator
    #41705

    Hi James

    Actually it is possible using some clever CSS 🙂

    Add this to your themes CSS file:

    .searchandfilter input[type='checkbox'] + label + ul
    {
    	display:none;
    	
    }
    .searchandfilter input[type='checkbox'][checked='checked'] + label + ul
    {
    	display:block;
    	
    }

    Thanks!

    Anonymous
    #42018

    Hi Ross,
    Thank you for your help. But when I click the check box in front of the categories, it doesn’t show the sub-categories. Is it right?

    Trevor
    #42021

    Hi James

    Unfortunately, the CSS does not work with the way jQuery handles checked checkboxes. The second part of the code would need to be:

    .searchandfilter input[type='checkbox']:checked + label + ul
    {
    	display:block;
    	
    }

    I think. The technical reason is that the first method looks at the checked attribute of the input, but with jQuery, it never adds checked="checked" to the element when you click it (which is the attribute), instead it changes the DOM property of the element, and the way I have re-written it checks that property.

    Anonymous
    #42022

    🙂
    Hi Trevor,
    Thank you for all your help. It’s work!!!

    Trevor
    #42023

    Can I now mark this as resolved and close the thread?

    Anonymous
    #42024

    The last question~
    I find it can’t show in the sidebar…

    Trevor
    #42026

    What can’t show? I notice that when I check any of the boxes there are no results showing? Does this mean you haven’t placed the results shortcode on the page (depending on the display method you are using)?

Viewing 10 posts - 1 through 10 (of 13 total)