Set Default Filter Label for Filters with Extra Settings
This JavaScript snippet forces filters with additional settings (like dropdown filters) to always display their default placeholder label. It’s useful when you want the label to reset after every filter change or apply event, ensuring a consistent UX for JetSmartFilters.
Specifications
Set Default Filter Label for Filters with Extra Settings
6 January, 2026
-
Plugin
-
Category
-
Programming languages
Installing Instruction
- Copy the provided JavaScript code snippet to your clipboard.
- Add the code using one of the following methods:
-
Option A: Using a Custom Code Plugin (Recommended)
- Install and activate a plugin such as WPCode Lite, Code Snippets, or Simple Custom CSS and JS.
- Create a new JavaScript snippet.
- Paste only the JavaScript code, without <script> tags.
- Save and activate the snippet.
-
Option B: Using a Custom Code / HTML Area
- Add the code in a Custom HTML widget or directly into a theme file (for example, header.php or footer.php).
- Keep the <script> tags when using this method.
- Save your changes.
-
Option A: Using a Custom Code Plugin (Recommended)
Example Use Case
Use this snippet to force JetSmartFilters filters with extra settings to always display their default placeholder label after changes.
Applicable scenarios:
- Filtering interfaces: Maintain clear filter states for better user understanding.
- E-commerce and catalogs: Reset filter labels after applying filters dynamically.
- Search and navigation: Ensure consistent UX for complex filter widgets.
Specifications
Set Default Filter Label for Filters with Extra Settings
6 January, 2026
-
Plugin
-
Category
-
Programming languages