Home › Forums › Calendar Products › Events Calendar PRO › Putting search bar on another page … everything works except geolocation
- This topic has 10 replies, 5 voices, and was last updated 9 years, 1 month ago by
Lily Buhring.
-
AuthorPosts
-
February 14, 2017 at 8:46 am #1234661
Lily Buhring
ParticipantHi,
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 🙂
February 15, 2017 at 5:49 am #1235138Andras
KeymasterHello 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,
AndrasFebruary 15, 2017 at 9:47 am #1235768Andras
KeymasterLilly,
Please check this thread. An answer of my colleague, Brook contains a list of scripts, check if dequeuing more helps.
Let me know.
Andras
February 15, 2017 at 10:50 am #1235904Lily Buhring
ParticipantHi 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.
February 15, 2017 at 10:53 am #1235910Lily Buhring
ParticipantThis reply is private.
February 15, 2017 at 1:12 pm #1236346Geoff
MemberHey 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!
GeoffFebruary 15, 2017 at 1:29 pm #1236367Lily Buhring
ParticipantHi,
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 :-/
February 16, 2017 at 9:04 am #1238813Andras
KeymasterHi 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:
Cheers,
Andras
March 2, 2017 at 3:09 pm #1248665Andras
KeymasterHi 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,
AndrasMarch 24, 2017 at 9:35 am #1259640Support Droid
KeymasterHey 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 -
This reply was modified 9 years, 2 months ago by
-
AuthorPosts
- The topic ‘Putting search bar on another page … everything works except geolocation’ is closed to new replies.
