Events plus Archive

Hello, I have installed the Events+ plugin and it works great but the way archive displays only this months events is not what I need. I tried to active the add-on that displays all events but it literally displays all of them in ascending order. What I am looking for is to display them in descending order (latest published first) and have only 10 or whatever per page with navigation - instead of all one page. Can you please tell me how can I achieve that?

Thanks!

    Sajid

    Hello Graham,
    Hope you are doing good today

    Yes, I could see this issue on my own site too. It defaults to all events with ascending order and lists all. Even though it is not convinient but it is working the way it designed.

    Let me flag one of our developer here to get his invaluable feedback on this matter. If it could be sorted the way you want then we would love to come up with a code based solution according to requirments. But please note that developer's response might be slower than normal support so we really appreciate your patience here.

    Take care and have a nice day

    Best Regards,
    Sajid - WPMU DEV Support

    Ivan

    Hi Graham !

    You can try create MU plugin ( Create {wordpress_folder}/wp-content/mu-plugins/wpmu_event_pagination_and_ordering_archive.php file via FTP ) with the following code

    <?php
    function wpmu_eab_ordering_date_ordering_direction() {
        return 'DESC';
    }
    
    function wpmu_event_pagination_and_ordering_archive ($query) {
        global $wp_query;
        if ( is_admin() || !$wp_query->is_main_query() || !is_post_type_archive('incsub_event') ) return;
        $query->set( 'posts_per_page', 10 );
        add_filter( 'eab-ordering-date_ordering_direction', 'wpmu_eab_ordering_date_ordering_direction' );
    }
    add_action('pre_get_posts', 'wpmu_event_pagination_and_ordering_archive');

    Also, you can create page with "events" slug with this shortcode
    [eab_archive paged="yes" limit="10" order="DESC" ]

    All attributes for Event shortcodes you can see here - {your_domain}/wp-admin/edit.php?post_type=incsub_event&page=eab_shortcodes

    Let me know how it goes for you.

    Best regards,
    Ivan.