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.
Ce sujet contient 4 réponses, a 2 voix.
Dernière mise à jour par Il y a 2 années et 4 mois.
Assisté par: Christopher Amirian.