Putting search bar on another page … everything works except geolocation

Home Forums Calendar Products Events Calendar PRO Putting search bar on another page … everything works except geolocation

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #1234661
    Lily Buhring
    Participant

    Hi,
    I’m trying to put the main search bar on the front page of my website and show the results in the main calendar page.

    I followed the info in this thread (https://theeventscalendar.com/support/forums/topic/whole-search-bar-on-another-page/), and on this site (http://gregorypearcey.com/blog/add-tribe-events-search-bar-home-page/)

    I was able to get nearly everything working, the keyword & date return the correct results on the calendar page…only the geolocation doesn’t work. When I put in the name of a city, it shows all events on the next page instead of the ones in the city.

    The problem seems to be that the longitude & latitude aren’t being sent in the url.

    Here’s what I put in functions.php:

    function tribe_bar_anywhere_logic() {
        if ( ! class_exists( 'Tribe__Events__Bar' ) ) {
            return false;
        }
        wp_enqueue_script( 'jquery' );
       Tribe__Events__Template_Factory::asset_package( 'bootstrap-datepicker' );
       Tribe__Events__Template_Factory::asset_package( 'ajax-calendar' );
        Tribe__Events__Template_Factory::asset_package( 'calendar-script' );
        Tribe__Events__Template_Factory::asset_package( 'jquery-resize' );
        Tribe__Events__Template_Factory::asset_package( 'events-css' );
        Tribe__Events__Bar::instance()->load_script();
        ob_start();
        tribe_get_template_part( 'modules/bar2' );
        return ob_get_clean();
    }
    add_shortcode( 'tribe_bar_anywhere', 'tribe_bar_anywhere_logic' );

    Maybe I’m not calling the right script …?

    Is anyone be able to help me solve this or point me in the right direction?

    Thanks a lot 🙂

    #1235138
    Andras
    Keymaster

    Hello Lilly,

    Thanks for using our plugins and for reaching out.

    This is a bit beyond my reach, and although we are limited on doing and supporting customizations, I will check with the team if someone has the bandwidth to help you out and give you some pointers. Please hang in there.

    Thanks and cheers,
    Andras

    #1235768
    Andras
    Keymaster

    Lilly,

    Please check this thread. An answer of my colleague, Brook contains a list of scripts, check if dequeuing more helps.

    Dequeue ECP scripts

    Let me know.

    Andras

    #1235904
    Lily Buhring
    Participant

    Hi Andras,

    Thanks a lot for your help!

    I’ve enqueued the scripts from that list, but still no luck getting the geoloc parameters to the next page.

    In the console, the TEC debugger says “Live ajax returned its state as: ‘false'”, maybe that has something to do with it…?

    • This reply was modified 9 years, 2 months ago by Lily Buhring.
    #1235910
    Lily Buhring
    Participant

    This reply is private.

    #1236346
    Geoff
    Member

    Hey Lily!

    I wanted to chime in here as well to share this post:

    http://gregorypearcey.com/blog/add-tribe-events-search-bar-home-page/

    While it’s a little dated, but it once helped someone else who was seeking to do the same sort of custom development and I’m hoping it helps get the ball rolling for you as well.

    Cheers!
    Geoff

    #1236367
    Lily Buhring
    Participant

    Hi,
    Thanks for your reply.
    This is the article I followed, & was able to make everything work except geolocation.
    In his example, he doesn’t use the “near me” feature.

    It’s frustrating, because I’m sure it’s just a matter of loading the right scripts in the page…but I don’t know which ones they are :-/

    #1238813
    Andras
    Keymaster

    Hi again Lily,

    I’m also not quite sure which script that can be. I’ll ask the team if someone knows, but cannot promise anything.

    In case you need professional help with this, here is a list of developers who are well known in the community. They might be able to help you out as well:

    list of freelancers

    Cheers,

    Andras

    #1248665
    Andras
    Keymaster

    Hi Lily,

    Did you make any progress on this?

    What you can try is dequeuing all scripts and then putting them back one-by-one and check where it kicks in.

    Let me know if you have any more questions or if I close this ticket.

    Thanks and cheers,
    Andras

    #1259640
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 10 posts - 1 through 10 (of 10 total)
  • The topic ‘Putting search bar on another page … everything works except geolocation’ is closed to new replies.