I would like to know if there is any way to collapse long filters

Hello,

I would like to know if there is any way to collapse long checkbox filters.

Hi! The easyest way, if you use this css:

.hp-field.hp-field--checkboxes{max-height: 6.1rem;}

It will create a scrollbar for the checkboxes. With this setting (6.1rem) showing about ~ 3 checkboxes without scrollbar, if more, the scrollbar will be automatically added. Change the number, if you want to see more checboxes without scrollbar. If you want the checkboxes be collapsible, it need a php snippet, you can’t do it with a simple css.

1 Like

Would you have this php code snippet?

Hi! You don’t need php for this. Just insert that css above, into the “Additional css” field, from the front-end customiser. If you want a “real” collapsible, it need a php what I have not “currently” :smile:

I was actually referring to the part about collapsing and expanding the filters. I applied the CSS but it didn’t look good.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.