Forums › Forums › Search & Filter Pro › How to customize the filter section?
Tagged: Customize filter, V3
- This topic has 1 reply, 2 voices, and was last updated 5 years, 9 months ago by
Trevor.
-
Anonymous(Private) March 26, 2020 at 2:03 pm #237958
We know how to customize the results, for example via the results.php file.
But I don’t know how or where I can customize the filter itself.
I need to add some JavaScript code because I want to hide and display my big amount of categories via checkboxes and reduce this long list of categories with a “Show more/Show less” button.
To do so, I need to edit the HTML of the filter I use and adding some JS code for my button.
Could you help me to do that or find where is located this file please?PS: Sorry if the question has already been asked in this forum, but it is not easy to find an answer in all the asked questions here, even via the search field.
Thank you.
Trevor(Private) March 26, 2020 at 3:28 pm #237978Hi
You need to be very careful about altering the HTML of the form, as our plugin expects a certain structure, and if you alter this, it CAN break the functionality.
I do not have snippets I can share with you, you would need to hire a third party coder. But, you should not modify our core plugin files to do this. There is a great risk that an update would overwrite your edits.
V3 of our plugin (due in a few weeks, but I cannot say exactly when) allows a lot more flexibility when it comes to design changes.
If you are creating your own JS to do this, not that it may need to be loaded on document ready and also (possibly) on ajaxfinish and ajaxformfinish. These events are described here:
-
AuthorPosts