• Resolved Cliff Antone

    (@etoolsmith)


    Hello, has anyone had any luck with creating a Custom Filter for the Filter Bar extension on the 6.x version of The Events Calendar?

    I have done this numerous times on 5.x but we are looking to upgrade a few sites to the 6.x version as well as build a few new sites and having a very difficult time coming up with a solution.

    My research has brought me to with extension: https://theeventscalendar.com/extensions/creating-a-custom-filter-for-filter-bar/

    It shows the filter, as well as ALL of the options but no matter what it will NOT filter the events.

    I have tried this AS IS from the download as well as building out the Custom Integration which tries to filter Events via Custom Taxonomy without any luck.

    I tried to reach out to support without any luck unfortunately, so any help on here would be GREATLY appreciated.

    Thank you.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Darian

    (@d0153)

    Hi @etoolsmith

    Thanks for your message. Unfortunately, we cannot provide support in this forum for premium users.

    For us to help you better, please open a Support Ticket on our Help Desk. If you already submitted a support ticket, could I ask for the ticket number?

    Thread Starter Cliff Antone

    (@etoolsmith)

    Hello @d0153, I did submit a support ticket without having the issue be resolved unfortunately.

    Which is why I am reaching out to the public and hopefully find someone who has had success in implementing custom filtering to the filter bar on the new 6.x version of the plugin.

    The 5.x version I have had success numerous times but unfortunately ability of creating custom filters on the filter bar is no longer possible based on what I can find and what I was told via the support ticket.

    Plugin Support Darian

    (@d0153)

    Hi @etoolsmith

    Could I ask for the ticket number you’re referring to? I want to review it on my side.

    Looking forward to your reply.

    Thread Starter Cliff Antone

    (@etoolsmith)

    Entry: 1613663

    Plugin Support Abz

    (@abzlevelup)

    Hi @etoolsmith, thanks for sharing the reference ID, reaching back to you soon in our HelpDesk this question is about our Premium Plugins.

    I’d be closing this topic. Please do bump another topic if you have questions about our Free Plugins. Have a great day!

    @etoolsmith after far too many hours banging my head against the wall trying to get this to work, support at the events plugin pointed me towards this updated custom code: https://theeventscalendar.com/extensions/creating-a-custom-filter-for-filter-bar/

    I was able to use that plugin extension to put in my own filters for custom taxonomies, by…

    • installing the plugin
    • duplicating the Time_Of_Day_Custom.php file within the src folder
    • renaming “class Time_Of_Day_Custom” to “class Whateveryouwant” (I chose “Locations”)
    • removing everything after “use Context_Filter;”
    • going to the-events-calendar-filterbar/src/Tribe/Filters/Category.php
    • copy/pasting everything within the class function into the new file
    • replacing “Tribe__Events__Main::TAXONOMY” with my custom post type name (mine was “wpx-location”)
    • editing tribe-ext-custom-filter.php to reference the new function by duplicating the other references and updating the names accordingly

    examples:

          include_once __DIR__ . '/src/Time_Of_Day_Custom.php';
          include_once __DIR__ . '/src/Locations.php';
          $map['filterbar_time_of_day_custom'] = 'Time_Of_Day_Custom';
          $map['filterbar_locations'] = 'Locations';
            $locations['filterbar_time_of_day_custom'] = [ 
                'read' => [ 
                    \Tribe__Context::QUERY_VAR   => [ 'tribe_filterbar_time_of_day_custom' ],
                    \Tribe__Context::REQUEST_VAR => [ 'tribe_filterbar_time_of_day_custom' ]
                ], 
            ];
            $locations['filterbar_locations'] = [ 
                'read' => [ 
                    \Tribe__Context::QUERY_VAR   => [ 'tribe_filterbar_locations' ],
                    \Tribe__Context::REQUEST_VAR => [ 'tribe_filterbar_locations' ]
                ], 
            ];
            new \Time_Of_Day_Custom(
            __( 'Time Custom', 'tribe-events-filter-view' ),
            'filterbar_time_of_day_custom'
            );
    
            new \Locations(
            __( 'Locations', 'tribe-events-filter-view' ),
            'filterbar_locations'
            );

    hope this helps!

    Thread Starter Cliff Antone

    (@etoolsmith)

    Thank you @ukeboyska, yeah they directed me to that updated code as well and with a few tweaks I was able to get it working properly.. It was awhile ago now so I forget the issues that it had but all is working on this project now!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Custom Filter for the Filter Bar’ is closed to new replies.