Home › Forums › Calendar Products › Filter Bar › Mods to filter bar not working quite as expected
- This topic has 18 replies, 3 voices, and was last updated 9 years, 6 months ago by
Josh.
-
AuthorPosts
-
August 31, 2016 at 9:33 pm #1158549
Ruth
ParticipantHi there
I received some excellent assistance in another thread (https://theeventscalendar.com/support/forums/topic/hide-event-category-from-events-page-again/) and it appeared to address all my requests.
We have effectively created two events pages: one for workshops run by the client with tickets sold via the website (main events page with “community” category hidden) and the other as a community events page with no tickets sold via the website (“community” category archive page).
The filter bar has been modified to only display the category and sub-categories relevant to either the main events page or the “community” events page. This works fine on the main events page and when a sub-category is selected from the filter bar, results are returned (or not) as expected.
However, on the “community” events page, selecting a sub-category returns no results and simultaneously switches back to the main events page, meaning the filter bar then only shows the category and sub-categories for the main events page (ie. not “community”). Firstly, selecting some sub-categories on the community events page should definitely return results, as I know there are events in those sub-categories. Secondly, if there is a case of no results being returned, the user should remain on the “community” events category archive page, so they can re-select an alternative sub-category of “community” from the filter bar.
This is hard to describe. Here are the links to the two different events pages:
http://southernharvest.org.au/events/
http://southernharvest.org.au/events/category/community/
Hopefully you will understand what I’m trying to say by using the filter bar on both of those pages.
Thank you
KateAugust 31, 2016 at 9:37 pm #1158550Ruth
ParticipantSorry… I forgot to mention:
Also, when viewing the “community” events category archive page, after clicking the “next events” link to view more events, it then also returns a “no results found” message and switches back to the main events page, including the filtering for that page. There are definitely more events to view after the first page.
Thanks
KateSeptember 2, 2016 at 7:37 am #1159272Josh
ParticipantHey Kate,
Thanks for reaching out to us!
To start here, I’d like to address the issue of the pagination on a default category view (the second comment above). I believe there are some elements in that issue that could get us closer on the main issue you’re describing above.
To start, if you deactivate the filter bar on the site, does the pagination on the community category archive work again?
Thanks!
September 7, 2016 at 10:10 pm #1161373Ruth
ParticipantHi Josh
Sorry for the slow response. It can take me a while to get back to these things.
Yes, the pagination issue with the community category archive page goes away if I deactivate the filter bar plugin.
Regards,
KateSeptember 9, 2016 at 8:08 am #1162032Josh
ParticipantHey Donna,
Thanks for following up with us here and verifying that! This let’s us know that there aren’t any other issues at play here. Also, when linking directly to the paginated results for the archive (http://southernharvest.org.au/events/category/community/?tribe_paged=3) I can see that working now so, it looks like what you’re experiencing is most likely due to the previous customization.
Can you verify that if you temporarily remove the
add_filter( 'tribe_events_filter_values', 'tribe_hide_filterbar_categories', 10, 2 );line from that customization, does the pagination work throughout the calendar again as expected?Thanks!
September 11, 2016 at 3:18 pm #1162612Ruth
ParticipantHi Josh
No, removing that line does not fix the pagination problem. Still only one page of results and clicking “next events” returns “there were no results found”.
Kate
September 13, 2016 at 8:31 pm #1163754Josh
ParticipantHey Kate,
Thanks for following up with us here.
Hmmm, definitely wasn’t expecting that here. Can you verify that the snippets within the following links are the two final customizations added to the mix on your site:
If so, can you try:
- deactivating all other plugins and switching to a default WordPress theme
- see if the filters and pagination are working by default as expected (without the customizations you’re wanting on the site)
- next, add back the customizations into the functions file and see if the filters and pagination are working as desired
- If so, try switching back to your theme and see if the error you’re seeing now returns
- If not, try reactivating your other plugins one by one to see when the error returns
Let me know if this helps.
Thanks!
September 14, 2016 at 12:21 am #1163822Ruth
ParticipantHi Josh
The only difference is in the first snippet (post 1142662), where I changed line 11 of that snippet from this
‘terms’ => array(‘markets’),
to
‘terms’ => array(‘community’),
Out of interest, I changed it back to ‘markets’ and went to the Community Events page (community category archive page) to see if it fixed the pagination problem. It doesn’t.
I also wanted to see if it had an effect on the other problem (selecting a sub-category from the filter bar and getting to results). While the ‘markets’ term was in play, selecting the “dining” sub-category returned events in that category AND ALSO returned the user to the main events page, with only the workshops category and sub-categories available in the filter bar.
Re-entering ‘community’ put me back where I started with the problems I first came to you with. Hope that makes sense.
Could you please advise if this information helps before I start fiddling around with changing the theme etc? The site is live and I’d rather not make drastic changes unless I absolutely have to.
Many thanks
KateSeptember 15, 2016 at 5:37 am #1164529Josh
ParticipantHey Donna,
To completely remove the impact of that custom code, try removing both:
add_action( 'pre_get_posts', 'exclude_events_category' );and
add_filter( 'tribe_events_filter_values', 'tribe_hide_filterbar_categories', 10, 2 );From your code and test then. This will completely remove the impact of those snippets from your site and will let us see if the Filter Bar is working on it’s own within your current environment properly.
Thanks!
September 15, 2016 at 4:15 pm #1164895Ruth
ParticipantHi Josh
Removing those two lines does this:
* pagination on community category archive page now works, but
* the second and subsequent pages of results still return to the main events page, although only events in the community category are displayed.
Kate
September 20, 2016 at 6:09 am #1166330Josh
ParticipantHey Donna,
Would you mind sending me the export file of the content on your site as a private reply here (Tools > Export). I want to do some further testing and having an identical category setup and number of events will help me in trying to figure out exactly what’s going on with the previous snippets and see if this is something that we’re able to iron out.
Thanks!
September 20, 2016 at 3:58 pm #1166698Ruth
ParticipantHi Josh
Thank you so much for persisting with this. I really appreciate it.
However, when I try to attach/share the export file, I get a message that I can’t upload files of this type ie. XML export file. Can I email it to you separately, perhaps?
Kate
September 21, 2016 at 5:51 am #1166862Josh
ParticipantHey Donna,
Sure thing, you could compress the file into a zip file and attach it here. If you’re on a mac, that would be right click the file and select ‘Compress “{file_name}”‘ option there.
That should work to attach here. You could also send it to support[at]theeventscalendar.com and request the email comes to me.
Thanks!
September 30, 2016 at 11:16 am #1171159Josh
ParticipantHey Donna,
I’m terribly sorry I missed responding to this here. I’ve got the email with xml file I’m working on getting it set up on my local install and digging into the potential issues here.
I’m thinking the root of the issue here is associated with ajax requests loading the different screens and some of the original filters applied to the filter bar displays not persisting once those requests are made. If that’s the case, that is an additional level of complexity here that I’m not positive I’ll be able to provide a couple of snippets for to overcome. But, I’ll take a look to see if there is something that I can see that would work here.
Thanks!
October 13, 2016 at 5:35 pm #1176348Ruth
ParticipantHi Josh. Just wondering if you’ve had any time to look at this and if what you suspect is true. Thanks. Kate
-
AuthorPosts
- The topic ‘Mods to filter bar not working quite as expected’ is closed to new replies.
