Posterboard Archive Order
-
Hi there, thanks for this beautiful plugin. I would like to ask the following: I’m trying to use the Posterboard on my Events Archive page.
That works fine but I would like to have the newest Events on top and the older events down.. I know there are some threads and one of them worked almost. I added the following code to my functions.php which works but somehow it shows the future events as well! Is there a fix which could resolve this?add_filter('posts_orderby','my_eventorganiser_sort_events',20,2); function my_eventorganiser_sort_events( $orderby, $query ){ global $wpdb; if( empty($query->query_vars['orderby']) ){ if( eventorganiser_is_event_query( $query, true ) ){ $orderby = " {$wpdb->eo_events}.StartDate DESC, {$wpdb->eo_events}.StartTime DESC"; } } return $orderby; }
On the page itself I use:
[event_board event_start_after=false]
Thanks in advance!
https://www.ads-software.com/plugins/event-organiser-posterboard/
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Posterboard Archive Order’ is closed to new replies.