Forum: Global Maps

This forum is closed for new topics. However, you can still search for a solution in the old topics. For technical support related to the Global Maps premium extension please open a new premium support ticket.

[Resolved]Global Map before search, search results map after search

Forums Global Maps Global Map before search, search results map after search

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #32003

    I would like to have a global map (already bought the add-on) that is displayed before the user searches, then have the results map be displayed in the same location. Can this be accomplished with existing functionality and javascript?


    Yes Eric,
    It should be pretty simple.
    in the page where you want to have the map and the search form you will need to have two short codes. one for the search form ( and results when form submitted) and another shortcode for the global map. So for example my my search form has the form ID 1 and my Global Map is form ID 3. IN my page I will set it up like:

    It this case when the page load I will see the search form ( make sure it does not set to automatically display results on page load) and below it the Global Map.

    you will need to add the code below to your functions.php file ( in your theme ):

    We attached a function to the global map using a filter. The function first check if Form ID 1 was submitted. If it was we check if the filter is on Global Map with ID 3, if it is we will disable the map.

    Just copy paste the function to your functions.php file and change the forms ID values.



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

You must be logged in to reply to this topic.