Change/Remove “ALL” from dropdown

New home Forums Pro Add-on General queries Change/Remove “ALL” from dropdown

Tagged: 

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #75113
    gurdyworld
    Participant

    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 Layers

    Thank you thank you!

    #75128
    Matthew
    Moderator

    Hi 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,
    Matthew

    #75140
    gurdyworld
    Participant

    Hi 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.
    #75165
    gurdyworld
    Participant

    Hi again Matthew!
    Just checking in on this. Still trying to understand how to get rid of that “All” in the dropdown for Marker Categories

    #75188
    Matthew
    Moderator

    Hi 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,
    Matthew

    #75271
    gurdyworld
    Participant

    Hi 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/

    #75283
    Matthew
    Moderator

    Hi 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,
    Matthew

    #75297
    gurdyworld
    Participant

    Hi Matthew!
    Thank you so much this worked!! You are the best! I appreciate you!!!

    #75315
    Matthew
    Moderator

    Hi 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

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.