Hello,
I have a nwe site using the Events Calendar Pro. Events posts show up in the main loop, which is great, but the show up from the last to start to the newest. I would like to have them in reverse order, or at least from the last to be posted to the oldest.
I have found a solution you gave to someone else by means of this code:
add_action( ‘pre_get_posts’, ‘tribe_post_date_ordering’, 51 );
function tribe_post_date_ordering( $query ) {
if ( $query->tribe_is_multi_posttype) {
remove_filter( ‘posts_fields’, array( ‘TribeEventsQuery’, ‘multi_type_posts_fields’ ) );
$query->set( ‘order’, ‘DESC’ );
}
}
However, when I tried to insert it in the funcions.php of my theme I get a bunch of errors in the page and Events Calendar widgets. Surely I am doing it wrong, because I am not a programmer at all. Would you please help me?
Thanks in advance!