Hello. I have a problem.
I have a dropdown that loads results of addresses of custom post type. If I aply select2 to that dropdown it shows no results.
I applied select2 following this instructions: https://toolset.com/forums/topic/make-the-toolset-form-generic-field-be-searchable/
The dropdown is located in custom search in archive.
Hi,
Thank you for contacting us and I'd be happy to assist.
Do you see any error or warning, in the browser's console or in the server's error log?
( ref: https://wordpress.org/documentation/article/debugging-in-wordpress/ )
If there are none, you're welcome to share temporary admin login details and the exact steps to see the issue.
Note: Your next reply will be private and making a complete backup copy is recommended before sharing the access details.
regards,
Waqar
Thank you for sharing the access details.
I've changed the custom script part from:
jQuery(document).ready(function() {
jQuery('.desplegabledir').select2();
});
To:
jQuery(document).ready(function() {
jQuery('#desplegabledir select').select2();
});
After this change, the select2 script is working.
Hello Waqar. Thanks a lot for your help!!!!