Problem:
How to remove the spaces and dashes 0 in the dropdown filter?
Solution:
Add the JS code below:
jQuery( document ).ready(function() { jQuery('select[name="wpv-authors"] option').each(function () { var theText = jQuery(this).text(); theText = theText.replace(' -',''); jQuery(this).text(theText) }); }); jQuery( document ).on( 'js_event_wpv_parametric_search_form_updated', function( event, data ) { jQuery('select[name="wpv-authors"] option').each(function () { var theText = jQuery(this).text(); theText = theText.replace(' -',''); jQuery(this).text(theText) }); });
Relevant Documentation:
https://toolset.com/course-lesson/adding-custom-javascript-to-views-templates-and-archives/
This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.
Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.
This topic contains 4 replies, has 2 voices.
Last updated by 1 year, 11 months ago.
Assisted by: Christopher Amirian.