catagory filter section

New home Forums Gold Add-on catagory filter section

Tagged: ,

This topic contains 6 replies, has 3 voices, and was last updated by  lbono 6 months, 2 weeks ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #47589

    abccqabc
    Member

    Hi

    As you will learn from the attached screen shot, my filer sits directly above the map in a drop down window. The drop-down window records all the categories and once you select one category, the relevant information under that category will appear. In my instance, currently I have English and Maths categories.

    It works fine, but from a presentation perspective, it doesn’t look professional. I notice a similar website has a Google map also includes a better looking filer system, where different categories are grouped under different tabs. The attached screen shot refers.

    It would be greatly appreciated if could provide advice on whether further enhancement/customisation can be made to the category filter section of the map.

    Thanks in advance! I look forward for your advice.

    Regards,
    Bob

    Attachments:
    You must be logged in to view attached files.
    #47606

    SupportTeam
    Moderator

    Hi Bob,

    Thank you so much for getting in touch with us.

    Please see this following gist, which will separate the categories into separate dropdown lists based on the priority set for each category. So all priority 1’s will be in one dropdown, 2’s in another.

    The titles for each drop down can be added in the cat_titles object a the top.

    https://gist.github.com/andtrev/de7e867d8de0810522c09262bc33e2ef

    Thanks so much,

    Kind Regards,
    Trevor Anderson

    #48019

    abccqabc
    Member

    Hi Trevor

    Thanks a lot for your reply and providing the code for me.

    As I am not technological competent, to fully grasp the meaning of the processes/logic behind the coding could take me ages 🙂

    I would like to clarify if, hypothetically, I need four separate filters/cat titles to filter the markers. Do I just add the titles of each filter after the first line of coding)? For example, if I have ‘English’, ‘Math’, ‘Music’, ‘Science’ as the filters/cat titles, do I just add names as follows? Do I need to add a comma to separate each of the cat title?

    var cat_titles = {English, Math, Music, Science
    “0”: “My Title:”,
    “1”: “My Other Title:”
    };

    Are there any other changes that I need to make to other parts of the coding you gave me?

    Your advice would be greatly appreciated.

    Regards,
    Bob

    #48085

    SupportTeam
    Moderator

    Hi Bob,

    So basically you would set the priority in the Maps -> Categories by editing the category. Then all categories with priority 0 will be in one drop-down, all in priority 1 will be in another and so on.

    You can add names to these drop-downs on the front end if you like, so if English was going to be priority 0 and Math was going to be priority 1, Music priority 2 and Science priority 3 the cat_title would look like this:

    var cat_titles = {
    “0”: “English”,
    “1”: “Math”,
    “2”: “Music”,
    “3”: “Science”
    }

    Thanks so much, hope this helps?

    Kind Regards,
    Trevor Anderson

    #48119

    abccqabc
    Member

    Hi Trevor

    Thanks heaps for your help. The code works great!

    Cheers,
    Bob

    #48128

    SupportTeam
    Moderator

    Hi Bob,

    So glad this is working for you. If there’s anything else I can help you with please let me know.

    If you ever have two minutes spare, please consider reviewing the plugin on https://wordpress.org/support/plugin/wp-google-maps/reviews/#new-post it would mean the world to me! (If possible, could I ask you to mention both your name and mine in the review for administrative purposes, this would be a tremendous help!)

    Thanks so much,

    Kind Regards,
    Trevor Anderson

    #48440

    lbono
    Member

    Trevor,

    Where do I put the code?
    Sorry if it’s obvious I just started with the plugin.

    #48449

    SupportTeam
    Moderator

    Hi there,

    You can add JavaScript code in your WordPress dashboard in Maps -> Settings under the Advanced tab in the Custom JS field.

    Thanks so much,

    Kind Regards,
    Trevor Anderson

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.