New home › Forums › Pro Add-on › General queries › Change/Remove “ALL” from dropdown
Tagged: categories
- This topic has 8 replies, 2 voices, and was last updated 10 months, 1 week ago by Matthew.
-
AuthorPosts
-
November 5, 2022 at 4:30 am #75113gurdyworldParticipant
I am trying to change the “All” default from the categories dropdown menu to “Select..”
Now, I know I’ve seen the answer for earlier versions (edit the _categories.php file – which I do not have in my version). Can someone please tell me where I can edit this field? My version information is as follows:
PHP Version: 7.2.34
PHP OS Family: Linux
MySQL Version: 5.6.51-cll-lve
Memory Limit: 128M
Post Max Size: 128M
Upload Max Filesize: 128M
Max Execution Time: 30
Max Input Time: 60
Max Input Variables: 1000
Build Code: B.9.0.13::P.9.0.13::V.3.34::A.O
Internal Engine: Atlas Novus
Map Engine: Open LayersThank you thank you!
November 7, 2022 at 8:56 am #75128MatthewModeratorHi there,
Thank you for getting in touch with us, we do appreciate your time.
The best way to do add this small customization is to use some custom JavaScript code as this code is saved and will not be undone when the plugins are updated.
With that said, please may you copy, paste and save the below code into the “Custom CSS” setting block (Maps -> Settings -> Custom Scripts):
jQuery(function($){ $(document).ready(function(){ $('.wpgmza-marker-listing-category-filter #wpgmza_filter_select option[value="0"]').html('Select...'); }) })
Once this has been done, please may you clear your browser cache and confirm if this helps?
I look forward to hearing back from you.
Kindest Regards,
MatthewNovember 7, 2022 at 6:12 pm #75140gurdyworldParticipantHi Matthew!
Thanks for that, but unfortunately it did not work. I pasted the code in as you specified. I cleared my cache, yet the drop down still reads “All” here: https://gurdyworld.com/gurdyworld-censusmap/Attachments:
You must be logged in to view attached files.November 9, 2022 at 4:56 pm #75165gurdyworldParticipantHi again Matthew!
Just checking in on this. Still trying to understand how to get rid of that “All” in the dropdown for Marker CategoriesNovember 10, 2022 at 9:43 am #75188MatthewModeratorHi there,
Apologies for the delayed response.
Thank you for the link to your map, it appears that you have a map with a VGM form on the page, however, seem unable to find the category dropdown element.
Please may you advise if I am viewing the correct map (https://gurdyworld.com/gurdyworld-censusmap/)?
I look forward to hearing back from you.
Kindest Regards,
MatthewNovember 13, 2022 at 4:42 am #75271gurdyworldParticipantHi again Matthew,
Yes sorry I had removed the categories are they were causing some issues. I’ve added it again now: https://gurdyworld.com/gurdyworld-censusmap/November 15, 2022 at 7:52 am #75283MatthewModeratorHi there,
Thank you so much for the confirmation, the previous code that I had provided did not work as I believed that you were referring to the category filter dropdown.
However nonetheless, here is the custom JS code for the category select for the VGM form:
jQuery(function($){ $(document).ready(function(){ let categorySelect = $('.wpgmaps_user_form select#wpgmza_category option[value="0"]'); categorySelect.html('Select...'); categorySelect.attr('disabled', 'disabled'); }) })
Please may replace the previous code with the code above, clear your browser cache and confirm if this helps?
I look forward to hearing back from you.
Kindest Regards,
MatthewNovember 15, 2022 at 8:32 pm #75297gurdyworldParticipantHi Matthew!
Thank you so much this worked!! You are the best! I appreciate you!!!November 17, 2022 at 9:56 am #75315MatthewModeratorHi there,
Thank you for getting back to me and most valued time, I tremendously appreciate it!
I am most happy to hear that, and it was my great pleasure assisting you with this.
Please may you kindly consider reviewing our plugin at https://wordpress.org/support/plugin/wp-google-maps/reviews/#new-post?
It would really mean the world to me! And if possible, please could I kindly ask you to mention both your name and mine in the review for administrative purposes as this would be a tremendous help?
Should you ever require any further assistance, I am more than happy to help.
Have a fantastic day further!
Kindest Regards,
Matthew -
AuthorPosts
- You must be logged in to reply to this topic.