Help Desk

Direct searches, categories and tags to filtered Event Calendar view

  • Posts: 16 Topics: 4
    | Permalink

    Hi TEC team

    I am trying to understand the simplest way to ensure that users are always directed to the “/events/” view with relevant filters applied. See following scenarios:

    Event Categories – currently if a user selects a category using a menu item or the tag cloud (showing event categories) they are successfully directed to /events/category/<category_name>/ but the Event Category filter in the filter bar is blank … can this reflect the filtered category name?
    Event Tags – currently selecting from a tag cloud directs the user to /tags/<tag_name>/ … is it possible to use /events/tags/<tag_name>/ instead? Also the same issue exists as above where the filtered tag does not show on the filter bar when navigating directly to that URL
    Search – same request, can we direct searches directly to a filtered /events/ view with the search term displaying in the search box?

    Thank you for creating such a great plugin!

    Cheers
    Shane

    Posts: 10067
    | Permalink

    Hi, Shane.

    These are the URLs generated by our demo site’s Filter Bar:

    And the Tribe Bar’s keyword search is http://wpshindig.com/events/month/?tribe-bar-search=meetup

    Are these not the URLs your site is generating?

    If not, I’d suggest following these recommended troubleshooting steps for your own site:

    There might be some new updates available. Could you please make sure all your Modern Tribe plugins (and WordPress core) are at their latest versions?

    Once you verify you’re on the latest versions, please test to see if the issue is still happening for you.

    If it is, please follow our Testing for Conflicts Guide (basically switch to Twenty Seventeen theme and deactivate all plugins and custom code other than Modern Tribe plugins) and see if that helps narrow down the cause of this.

    Of course, we always recommend restorable database and file backups before modifying anything on your site.

    If it doesn’t, please enable WP_DEBUG and WP_DEBUG_LOG (which will create a file on your server at /wp-content/debug.log if there are any WP_DEBUG messages) and share any debug messages you see while trying to replicate this issue and doing other things on your site relevant to this ticket (such as visiting your site’s home page, events page, single-event pages, and anything else you can think to do).

    Then, please share your System Information (while in Testing for Conflicts Mode) in a Private Reply. That will give me a lot of extra information to help troubleshoot this.

    You might also see if you can spot any console errors at your site. (If needed, you may reference our KB article Using Google Chrome Developer Tools.)

    Let us know what you find out.

    Thanks.

    Posts: 16 Topics: 4
    | Permalink
    This reply has been marked as private.
    Posts: 10067
    | Permalink
    This reply has been marked as private.
    Posts: 16 Topics: 4
    | Permalink

    Hi Cliff

    Thank you for the detailed response, this is very helpful. Yes, we’re using tags only for events, and the same for site searches.

    A code snippet would be great to ensure tags and any site searches i.e. /?s=<search_query_goes_here> are redirected to the Events view.

    If it’s possible to include Event Categories in this redirect also, as the default links to Categories i.e. /events/category/<category_name>/ do not result in the Filter Bar showing the filtered category in the Events view.

    Cheers
    Shane

    Posts: 10067
    | Permalink
    Correct Answer

    Shane, please let me know each of these go for you:

    1) Tags

    Try this snippet:

    2) Site Searches

    example.com/?s=screening would display both Posts and Events (and any other post types that are eligible to be displayed in search results).

    If you’re wanting all site searches to be redirected to search only events — as if they would have entered the search phrase into the Tribe Bar’s Keyword search box, please try this snippet:

    3) Event Categories (not regular Post Categories)

    They seem to be working as expected. For example, http://eventfamous.com/phnom-penh/events/category/classes-training-courses/ displays the Filter Bar like all other Events views and also has the applicable Event Category checked in the Filter Bar drop-down.

    Posts: 16 Topics: 4
    | Permalink

    Hi Cliff

    Thank you so much for your thorough response and the code snippets. Both work perfectly! And yes, I can see that the Event Category view is working correctly. I was confused as the filtered category isn’t displayed on the Filter Bar when you first arrive on the screen, but when you click the Event Category menu it is ticked (and if refiltered by Tag, Time, Venue etc it retains the category filter correctly).

    Thanks again!

    Cheers
    Shane

    | Permalink
    Posts: 10067
    | Permalink

    I’m very glad to have helped!

    If you have any issues you need more assistance with, please create a new thread with all the details.

    Have a great rest of your week.

The topic ‘Direct searches, categories and tags to filtered Event Calendar view’ is closed to new replies.