This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function($) { | |
$('.facetwp-sort')).on('change', 'select', function() { | |
FWP.refresh(); | |
}); | |
})(jQuery); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Attempt to preload the days events using a specific link | |
// Link URL should be structured this way http://mercerspace.com/events/?today=true | |
function fwp_preload_facets( $url_vars ) { | |
if( 'events' == FWP()->helper->get_uri() && isset( $_GET['today'] ) && empty( $url_vars ) ) { | |
$url_vars['event_dates'] = array( date( "Y-m-d" ) ); | |
} | |
return $url_vars; | |
} |