Home › Forums › Calendar Products › Events Calendar PRO › Filter choices and Filter Bar are lost when advancing to later dates
- This topic has 7 replies, 4 voices, and was last updated 9 years, 4 months ago by
Margie Wachtel.
-
AuthorPosts
-
December 14, 2016 at 6:20 am #1205786
Margie Wachtel
ParticipantRecently we contacted you for help with putting the Filter Bar below the page title, because the page looked messy when it was above the title. Following your advice to use functions.php to tell calendar not to put the filter bar before the content and to put the Filter Bar after the Title, this was successfully done. HOWEVER, this created another problem. Everything looks and works beautifully on the first page, but then as you advance to the next month/events listing:
1. The selections made for Type of Event and Location are not retained, so suddenly the user is looking at every single event we offer. (*Sometimes* they are retained for 1-2 advances, but never more than that.)
2. The Filter Bar disappears, so people can’t re-set to show only the types of events they wanted. After the first page, there seems to be no option but to look at all of our events – all types, all locations.
You can see the problem at http://www.familiesfirstseacoast.org/calendar/month/?tribe_eventcategory=33. How can we retain the functionality while still having the Filter Bar where we want it? Do any of your other users have this setup? Thank you.December 14, 2016 at 6:54 pm #1206242Hunter
ModeratorHi Margie,
Thank you for posting and welcome back. I notice in your System Information you have outdated versions of our plugins installed and activated. Can you please update to the latest versions? Could you also share the code you’re using the move the Filter Bar beneath the title? You can use Pastebin.com to share that code with me.
Lastly, can you review our Testing for conflicts guide to see if there is potentially a theme and/or plugin contributing to the issue? I’d try once with the custom code you’re using to change the Filter Bar position and once without we can see if that is also a factor.
The more specificity you can provide, the quicker we can identify the cause of conflict and start working towards an improvement. Thanks again and have a good evening. Cheers!
December 15, 2016 at 12:50 pm #1206674Margie Wachtel
ParticipantUpdated everything, still no change.
The code we finally got working in functions.php is below.
However, since your calendar uses AJAX for paging the functions.php file is not called when going to a second page. This means the add_action tribe_events_after_the_title doesn’t run so the filter bar does not get put in after the title. If we refresh the page the filter bar returns.
So is there some other way we can move the filter bar that WILL get called when the page is loaded AND when the AJAX paging call is made? Or some way to disable AJAX paging?
add_action( ‘wp_enqueue_scripts’, ‘removeTribeFilterBarDefaultDisplay’, 50 );
function removeTribeFilterBarDefaultDisplay() {
$filterClass = TribeEventsFilterView::instance();
remove_action(‘tribe_events_before_template’, array($filterClass, ‘displaySidebar’), 25);add_action( ‘tribe_events_after_the_title’ , array($filterClass, ‘displaySidebar’ ), 25 );
}December 16, 2016 at 9:09 pm #1207254Hunter
ModeratorWelcome back!
So is there some other way we can move the filter bar that WILL get called when the page is loaded AND when the AJAX paging call is made? Or some way to disable AJAX paging?
You could remove the code you’ve added which alters the position of the Filter Bar from your functions.php file and do a custom template override as explained in our Themer’s Guide. By doing so, you will be moving the actual code for the Filter Bar which should address the AJAX issue.
Please let me know if this makes sense and if you get caught up along the way. Have a great weekend and take care!
December 20, 2016 at 8:44 am #1208341Margie Wachtel
ParticipantCould you provide a quote to provide the custom code we need to accomplish this?
December 20, 2016 at 2:37 pm #1208536Hunter
ModeratorHello,
We aren’t actually able to provide custom work, so you’ll have to contact a developer for that kind of information. If you review the Themer’s Guide, it honestly wouldn’t be too difficult to pull this customization off by yourself or with a little help from someone with a little experience.
This YouTube video goes over the basic principles of creating and saving custom overrides, so give it a shot and see how things go!
Please let me know if this helps and have a great afternoon!
January 11, 2017 at 8:35 am #1216600Support Droid
KeymasterHey 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 -
AuthorPosts
- The topic ‘Filter choices and Filter Bar are lost when advancing to later dates’ is closed to new replies.
