• Hi!, I’ve been trying to find an answer about how to do this, i need be able to use the filter bar, to filter by events categories and a custom taxonomy named “event type” where we can find types as “twitter-chat”, “google hangouts” etc.

    I followed up this recommendation http://tri.be/support/forums/topic/filter-for-additional-field/

    Everything looks fine, but when i started to testing, i can’t get the filter for both things.

    It filter by Event Category OR Custom Taxonomy (“Event Type”), instead both.
    I mean, if i have an event with category a, but event type twitter-chat, and another with category b, but event type: google hangout.

    It returns the result only for the event type, and not filtering by the category.

    Here the custom snippet that i created:

    In filterbar/lib/filters/TribeEventsFilter_Category.php file:

    protected function setup_query_args() {
    $this->queryArgs[‘tax_query’] = array( ‘relation’ => ‘AND’, array(
    ‘taxonomy’ => TribeEvents::TAXONOMY,
    ‘field’ => ‘id’,
    ‘terms’ => $this->currentValue,
    ‘include_children’ => false,
    ) );

    }

    and In filterbar/lib/filters/TribeEventsFilter_EventType.php file:

    protected function setup_query_args() {
    $this->queryArgs[‘tax_query’] = array( ‘relation’ => ‘AND’, array(
    ‘taxonomy’ => ‘event_type’,
    ‘field’ => ‘id’,
    ‘terms’ => $this->currentValue,
    ‘include_children’ => false,
    ) );
    }

    As i understand, this, get the args for tax queries in an array where the relation is ‘AND’ with the other taxonomy.

    Then, the query should filter where Category = B AND Event Type = ‘twitter-chat’
    And returns only the events that matches with that criteria, but… it is doing the query like:

    ‘Event type’ = twitter-chat, without consider the category selected.

    I understand, this can’t be a common support request, but, i have a deadline for this week to get this filter working, and i can’t wait for a new release, hope you can help me 🙁

    Thankyou

    https://ww.wp.xz.cn/plugins/the-events-calendar/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Contributor leahkoerper

    (@leahkoerper)

    Hi Nancy,

    I’m sorry, but as outlined in our forum guidelines, we aren’t able to help with these kinds of customizations. But we do have some handy resources that might be helpful for you:

    Themer’s Guide – provides an overview of how to customize the plugin’s frontend appearance.
    Tutorials – useful tips and tricks for changing how the plugin looks and behaves.
    Technical Docs – provides an overview of the classes and functions in each plugin

    Good luck, and thanks for using The Events Calendar!

    ~Leah

    Thread Starter Nya Shebrian

    (@nscdde)

    I understand, but i’m trying to submit this same ticket in your forum for premium users, and i can’t, when i submit a post, i never be able to find it.

    I have license for premiun support for filter bar addon, community events addon and events calendar pro.

    I read the documentation, and created the custom extension, but it is not querirying as it should do it.

    Is getting posts filtered by category or filtered by event type, instead use both criteria as filter. 🙁 Where can i post this to get a premium level support?

    Plugin Contributor leahkoerper

    (@leahkoerper)

    Hi Nancy,

    I believe you emailed us and we were able to get you access to the premium support services. I’m going to go ahead and close up this thread. Thank you!

    ~Leah

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Filter by Custom Taxonomy’ is closed to new replies.