Home › Forums › Calendar Products › Filter Bar › Adding To Filter Bar Fields
- This topic has 8 replies, 3 voices, and was last updated 10 years, 9 months ago by
Support Droid.
-
AuthorPosts
-
June 5, 2015 at 4:59 pm #967594
Shah
ParticipantI just bought The event calendar Pro Filter Bar but found it useless since it does not allow adding filters like country and city. I wanted my visitors to locate the events based on categories (parent)/ Subcategories (child), Countries and cities. When I bought The event calendar Pro and the Community Plugins I was told that Filter bar is customizable. I thought I will be add cities and countries. Am I missing something? Is there any way to do that?
June 7, 2015 at 7:30 pm #967723Josh
ParticipantHey Shah,
Thanks for reaching out to us!
I apologize for any confusion about our Filter Bar plugin. It does have options to customize allowing you to disable or enable different filters as well as how those filters will display. However, out of the box, having the country/city of the venues be pulled in as options is currently available. I apologize again for the confusion.
You could potentially create an extension that adds this functionality, however a customization of that extent would be beyond what we’re able to support here in the forums.
An alternative would be to take advantage of the Filter Bar along with the Map view of the Pro plugin. The map view can be limited to a particular city/country and then the filters used in addition. Doing this would allow the filters to work as normal along top of a filter such as “tribe-bar-geoloc-lat=33.7489954&tribe-bar-geoloc-lng=-84.3879824&tribe-bar-geoloc=Atlanta%2C+GA%2C+USA” on the location defined.
The other benefit to this approach is the ability to take advantage of the “Distance” option on the filter. Your users would be able to search within a certain distance of the location that they choose.
Let me know if this helps.
Thanks!
June 7, 2015 at 10:49 pm #967739Shah
ParticipantThis reply is private.
June 9, 2015 at 9:03 am #968173Josh
ParticipantHey Shah,
No problem.
If the distance isn’t needed, you can remove that field from the Filters within the settings so that it no longer appears.
For the changing of the “Near” wording, try this https://gist.github.com/BeardedGinger/c88ac722d0e6f94efce2 by adding it to your theme’s functions.php file.
Let me know if this helps.
Thanks!
June 9, 2015 at 2:14 pm #968263Shah
ParticipantThanks Josh:
I did what told me to do. I copied and pasted the following code in function.php file which was originally empty. I did not see any change in search area. It did not replace Near Location to City Country.
add_filter( ‘gettext’, ‘replace_near_wording’, 10, 3 );
function replace_near_wording( $translations, $text, $domain ) {
if( $domain === ‘tribe-events-calendar-pro’ ) {
$text = str_replace(
‘Near’, // Text to search for
‘City, Country’, // Text to replace it with
$text
);
}
return $text;
}
Unfortunately the code appeared on top of my home page above main site. I went back and deleted that code. Now it would not go to wp-admin interface and show an error. I called my hosts tech support and he fixed that problem by change Php.ini (looks like that code did something to PHP.INI file. I am back to the same place. Can you tell me what I might have done wrong??
June 10, 2015 at 7:50 pm #968673Josh
ParticipantHey Shah,
Thanks for following up. It sounds like you may have placed it in a bad place within the file.
When pasting the code, ensure that you place it immediately after an existing opening “<?php” at the top of the file or before an existing closing “?>”. The best place to paste would be at the very bottom of the file right before the closing “?>”.
Let me know if this helps.
Thanks!
June 12, 2015 at 2:07 am #968959Shah
ParticipantThanks again Josh:
I was told by a tech support person that I might have to edit different functions.php
Did you mean I needed to insert this code into Avada Theme’s function.php file and not Event Pro’s.?June 12, 2015 at 6:38 am #969004Josh
ParticipantHey Shah,
No problem. Yes, this will need to go in your theme, so if that’s the Avada theme (or a child of the Avada theme) it should go there rather than in our plugin files.
Thanks!
July 7, 2015 at 6:32 am #984307Support Droid
KeymasterThis 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. -
AuthorPosts
- The topic ‘Adding To Filter Bar Fields’ is closed to new replies.
