Forum Replies Created
-
AuthorPosts
-
December 20, 2016 at 8:44 am in reply to: Filter choices and Filter Bar are lost when advancing to later dates #1208341
Margie Wachtel
ParticipantCould you provide a quote to provide the custom code we need to accomplish this?
December 15, 2016 at 12:50 pm in reply to: Filter choices and Filter Bar are lost when advancing to later dates #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 );
}Margie Wachtel
ParticipantWe were able to create some code that works. Thank you.
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 );
}Margie Wachtel
ParticipantOK, we added that code to functions.php and now we have 2 of the “Narrow Results” sections and the one that is where we want it to be (the second one) doesn’t work.
http://www.familiesfirstseacoast.org/calendar/month/?tribe_eventcategory=33
-
AuthorPosts
