City and/or country Search does not work

Home Forums Calendar Products Events Calendar PRO City and/or country Search does not work

  • This topic has 0 replies, 2 voices, and was last updated 6 years ago by Shah.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1490916
    Shah
    Participant

    Please have a look at the event below
    https://medicalevents.com/event/world-drug-safety-congress-americas-2018/

    This event does not show up when I type Philadelphia and or USA in the field that says NEAR (after clicking category). Later I added city and country to through description and it shows up in keyword search. The organizer had the city and country in the Venue address.
    It is extremely important for our site for the events to show up through category country and city. I also want to change the field that says NEAR to City + country since, our site is a global site.

    #1492652
    Jeremy
    Keymaster

    Hi Shah,

    Thanks for reaching out to us!

    In the Near field, you can enter an address or a city, but a country shouldn’t give any result.

    Within the Pharmaceutical category, I entered Philadephia in the Near field and the event you mentioned appeared in the results. If it doesn’t show up on your side, could you give more details: are you logged-in when you enter the city? Which web browser are you using?

    Could you try in while logged out, in a private window?

    For even more precise filtering capabilities, you could use our Filter Bar add-on. That way, you could adjust the radius for your location-based searches by using the Distance filter.

    Finally, to change the field that says Near to City, you would need to add a piece of code to your theme.

    Copy/paste the snippet below to your theme’s functions.php:

    function tribe_custom_theme_text ( $translation, $text, $domain ) {
    
    // Put your custom text here in a key => value pair
    // Example: 'Text you want to change' => 'This is what it will be changed to'
    // The text you want to change is the key, and it is case-sensitive
    // The text you want to change it to is the value
    // You can freely add or remove key => values, but make sure to separate them with a comma
    // This example changes the label "Near" to "City"
    $custom_text = array(
    'Near' => 'City',
    );
    
    // If this text domain starts with "tribe-", "the-events-", or "event-" and we have replacement text
    if( (strpos($domain, 'tribe-') === 0 || strpos($domain, 'the-events-') === 0 || strpos($domain, 'event-') === 0) && array_key_exists($translation, $custom_text) ) {
    $translation = $custom_text[$translation];
    }
    return $translation;
    }
    add_filter('gettext', 'tribe_custom_theme_text', 20, 3);
    

    I hope this helps.

    Cheers,

    Jeremy

    #1492659
    Jeremy
    Keymaster

    Antoher thing: if you are uncomfortable adding snippets to your functions.php file you can also try Say What, a very nice plugin which would allow you to quickly change any string in your website.

    Best,

    Jeremy

    #1493910
    Shah
    Participant

    Thanks, Jeremy:

    I appreciate your response. Actually, we have no interest in distance radius etc. since we are a global portal as you can see it. our main interest is adding a country field to the three current fields (Date, keywords, and city). I looked in filter bar option but that too does not look like having a country option. Is there any code that I could add to have the fourth country option?

    • This reply was modified 6 years, 1 month ago by Shah.
    #1494571
    Jeremy
    Keymaster

    Hi Shah,

    I’m happy to help. You could add a Country filter with our Filter Bar add-on.

    Once this add-on is activated, configure its settings so that Country is added ton the filter bar.

    Since the Country filter is an important one in this context, you might want to modify those settings as well:
    Filters Layout => Horizontal
    Filter Bar default state => Show on initial page load

    Please let me know if that solved your problem.

    Cheers,

    Jeremy

    #1514931
    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 6 posts - 1 through 6 (of 6 total)
  • The topic ‘City and/or country Search does not work’ is closed to new replies.