Home › Forums › Calendar Products › Filter Bar › Filter option "near City" not working…
- This topic has 5 replies, 2 voices, and was last updated 9 years, 11 months ago by
Hunter.
-
AuthorPosts
-
April 26, 2016 at 3:40 am #1107010
Henning
ParticipantDear TEC(P)-Team,
we are having issues with the GeoLoc-filter that is in place with /calendar.
TEC & TECP are up to date. I have deactivated all the other plugins, no changes.
Reverting to the twenty sixteen theme DID SOLVE THE ISSUE, now the filter is working properly but I cannot figure out what is wrong with our current (child-)theme since I compared and updated the template files accordingly (Diff-checker run for the original plugin-files and our theme files)…
I’ve noticed that the URL isn’t being generated properly in our current theme, instead of
(which I took from the twenty sixteen test environment) it just outputs
If I manually enter the URL with tribe-bar-geoloc-lat & tribe-bar-geoloc-lng then it works fine in our current environment as well.
TEC Debug is activated for you to further inspect.
Please advise!
Thanks & regards,Henning
April 26, 2016 at 6:43 pm #1107491Hunter
ModeratorHi Henning,
Welcome to the forums. Based on the issue being resolved once reverting back to the default theme, there is unfortunately not much I can do in regards to theme conflicts. Your best bet is to contact your author to see if they have any insight on how to go about resolving the conflict.
I really do wish I could be of more assistance but these types of requests extend beyond the scope we’re able to provide. Thanks for understanding and good luck finding a solution.
April 28, 2016 at 7:07 am #1108188Henning
ParticipantAllright, I’ve found the cause of the issue myself – it lies within my renaming of the filter bar via the following code… If I deactivate the function(s) then the geoloc-stuff loads fine and fires accordingly.
Could you be of assistance here at least? What else do I need to include into my function in order to get things to work / filter properly?
Thanks!
/** * Modify The Events Calendar search labels / placeholders */ function placeholder_rename_search( $filters ) { $value = ''; if ( ! empty( $_REQUEST['tribe-bar-search'] ) ) { $value = esc_attr( $_REQUEST['tribe-bar-search'] ); } $html = sprintf( '<input type="text" name="tribe-bar-search" id="tribe-bar-search" value="%s" placeholder="%s">', esc_attr( $value ), 'Topic or Class' ); $filters['tribe-bar-search']['caption'] = 'Search'; $filters['tribe-bar-search']['html'] = $html; return $filters; } function placeholder_rename_location( $filters ) { $value = ''; if ( ! empty( $_REQUEST['tribe-bar-geoloc'] ) ) { $value = esc_attr( $_REQUEST['tribe-bar-geoloc'] ); } $html = sprintf( '<input type="text" name="tribe-bar-geoloc" id="tribe-bar-geoloc" value="%s" placeholder="%s">', esc_attr( $value ), 'City' ); $filters['tribe-bar-geoloc']['caption'] = 'Near'; $filters['tribe-bar-geoloc']['html'] = $html; return $filters; } add_filter( 'tribe-events-bar-filters', 'placeholder_rename_search' ); add_filter( 'tribe-events-bar-filters', 'placeholder_rename_location' );April 29, 2016 at 3:31 pm #1109022Hunter
ModeratorI’m glad to hear that you’ve identified the culprit! I took a quick look through those functions and didn’t spot anything obviously problematic—no syntax errors, for example.
So this means that you have some other not-so-obvious problems in your customization.
As noted on this page, we are not able to help with customizations → https://theeventscalendar.com/knowledgebase/what-support-is-provided-for-license-holders/. I took a quick look at things regardless to no avail, so you’ll have to take the reins from here.
If you are not able to troubleshoot your code yourself, I would recommend hiring a professional to help. We have a list of great developers here → http://m.tri.be/18k1 (and have no affiliation with any of these folks–they’re simple some well-respected names in the community that we’ve compiled to share in situations like this one).
Best of luck with your customizations!
April 30, 2016 at 2:28 am #1109071Henning
ParticipantOK, thanks for the clarification!
May 2, 2016 at 9:38 am #1109586Hunter
ModeratorSure thing 🙂
I’ll close this out but feel free to open a new thread should anything else come up. Have a good week!
-
AuthorPosts
- The topic ‘Filter option "near City" not working…’ is closed to new replies.
