Maps view only dipaly event contents once a search is activated

Home Forums Calendar Products Events Calendar PRO Maps view only dipaly event contents once a search is activated

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #997128
    Scott
    Participant

    Maps view

    The default view is to show all events on the map when no geo search has been activated. What I would like is to only list event contents once a geo search has been activated.

    I have accomplished this to some degree by editing the map.php file in my child theme

    <!-- Main Events Content -->
    <?php if (isset($_GET['tribe-bar-geoloc']) || isset($_POST['tribe-bar-geoloc'])) { ?>
    <?php tribe_get_template_part( 'pro/map/content' ) ?>
    <?php } ?>

    This is not working reliably and I believe it is due to an ajax call to retrieve the search results rather than a page refresh. When you first load the map view no found events are displayed. Then when you perform a search the map finds the events, but the content results are not rendered. On the results page with all the url parameters you can do a page refresh and then you see the desired results.

    How can I make my events dispaly conditionally based on a search or no search reliable.

    Below is the URL for my test site. NOTE: the listing of “All Upcoming Events” is not what I am talking about. That section has been created to always display after the search results. This the reason I wish to hide the results when there has bee no search action.

    Thanks in advance!

    http://pringletech.net/ameriestate/events/

    #997296
    George
    Participant

    Sorry Scott, we don’t offer support for customizations here on the forums and getting all this to work as you envision is a bit too complex for the level of customization support we can normally offer…

    It personally seems to me like all this might be easier for you to implement if you simply hide the Map View on page load with JavaScript, then “show” it upon the submission of a search or some similar action. Do you agree with this? If so, you can avoid having to make custom template files and just drop a little bit of custom JS into your theme’s functions.php file

    Apologies that we can’t get too in-depth here. Let me know what your thoughts are in regards to what I wrote above.

    Cheers,
    George

    #1001591
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Maps view only dipaly event contents once a search is activated’ is closed to new replies.