• Is there any way to include the events in the main loop? I figured there would be an option for this in settings, but no such luck.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter justmattb

    (@mwbarker)

    This appears to do the trick:

    /*-----------------------------------------------------*/
    /** Add calendar events to loop                       **/
    /*-----------------------------------------------------*/
    function add_post_types_to_loop($query) {
        if ($query->is_main_query() && $query->is_front_page()) {
            $query->set('post_type', array('post', 'ai1ec_event'));
        }
    }
    add_action('pre_get_posts', 'add_post_types_to_loop');

    Now the question is… how do I exclude specific categories (i.e. for imported holiday calendars)? Anybody?

    HI @mwbarker,

    Your inquiry requires changes in the code, which unfortunately we cannot help with as part of our support. We’ll keep this topic open for a few days for other user to chime in if possible. Thanks for your understanding.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Events in Main Loop’ is closed to new replies.