Filter bar and custom taxonomies?

Home Forums Welcome! Pre-Sales Questions Filter bar and custom taxonomies?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1396901
    ferrycp
    Participant

    Hi,

    I added a custom taxonomy (composer) to my concert events (pro version). Is it possible to use this taxonomy als a filter too?
    And how about custom fields, can I use them als filter options too? For example a select with different type of concerts.

    Thanks

    #1398112
    Andras
    Keymaster

    Hi ferrycp,

    Thanks for using our plugins and welcome to the forums!

    By default custom taxonomies and custom fields don’t appear in the filter bar. You will need to do some custom development for that. Here’s our guide on how you can create custom filters for Filter Bar.

    I see you have a PRO license. What you might consider is using the Additional Fields for the events instead of custom fields. Additional Fields can be set up to be used with Filter Bar. Here’s a screenshot which might help.

    If you have more questions just let me know.

    Cheers,
    Andras

    #1399209
    ferrycp
    Participant

    Hi,

    I tried already the custom fields and noticed that the tribe-bar-search field doesn’t look inside them.
    For example I create a textarea for the concert program, but the free search field searches only in the description and the titel.
    Is this something you can fix?

    PS. it would be very helpful to have a field with basic wysiwyg functionality.

    #1399865
    Andras
    Keymaster

    Hello,

    I guess that could be done, but it would require customization work, which is beyond the scope of the support we can provide.

    I might be able to give you some direction and pointers, but you will need to do the coding yourself. To be clear, you would like it to search in the custom fields (which exists for all post types) or in the ‘Additional Fields’ that come with Events Calendar PRO?

    PS. it would be very helpful to have a field with basic wysiwyg functionality.

    By this do you mean having an Additional Field that would allow some formatting?

    If you think that is something you would like as a feature I encourage you to visit our User Voice Page and either upvote an existing request or make a new request there.

    Andras

    #1400041
    ferrycp
    Participant

    Hi Andras,

    because the additional fields provided by the Pro plugin doesn’t offer any formatting options, I need to search in my own custom fields. Please provide your resources/examples and I will modify the code on my own.

    #1400183
    Andras
    Keymaster

    Hi,

    Maybe a generic solution like this (untested) might do the trick.

    Or some custom code like in this article, might also help you get started.

    Search is run by this function:

    public static function pre_get_posts( $query )

    in this file:

    wp-content\plugins\the-events-calendar\src\Tribe\Query.php

    The keyword search is specifically handled in lines 217-220:

     // if a user provides a search term we want to use that in the search params
    if ( ! empty( $_REQUEST['tribe-bar-search'] ) ) {
    $query->query_vars['s'] = $_REQUEST['tribe-bar-search'];
    }

    Then you will need to tap into ‘pre_get_posts’ so the search is done in custom fields as well.

    Also this article on Customizing the Events Bar might be a good resource. Contains an example on how you can tap into ‘pre_get_posts’.

    Let me know if this helps and if you have any further questions.

    Cheers,
    Andras

    #1414509
    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 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Filter bar and custom taxonomies?’ is closed to new replies.