Viewing 3 replies - 1 through 3 (of 3 total)
  • For V2.0:

    Currently, without editing the core plugin, no.

    You can add these into …../all-in-one-event-calendar/lib/twig/ai1ec-extension.php as twig functions (you will see many examples in that file on how they work) and then access these through twig in a child theme.

    For twig documentation, look at: http://twig.sensiolabs.org/documentation

    Thread Starter larethian

    (@larethian)

    Well, I tried to work around learning twig by trying to use the loop in my template to iterate through the events.

    This works, but I can’t seem to get the events into the right order, because ai1ec stores the dates and times in an extra table in the database.

    Which should work with a post_orderby filter.

    Thread Starter larethian

    (@larethian)

    I tried this now in my loop:

    $querystr = "
    	SELECT $wpdb->posts.*
    	FROM $wpdb->posts
    	WHERE $wpdb->posts.post_type = 'ai1ec_event'
    	AND ($wpdb->posts.post_status = 'publish' OR $wpdb->posts.post_status = 'draft' OR $wpdb->posts.post_status = 'revision')
    	INNER JOIN rwf_ai1ec_events ON (rwf_ai1ec_events.post_id = $wpdb->posts.ID)
    	ORDER BY rwf_ai1ec_events.end DESC
    ";
    
    $pageposts = $wpdb->get_results($querystr, OBJECT);

    This doesn’t work – as soon as I try to join, I get no results in $pageposts.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘WordPress Theme Functions In Calendar Theme’ is closed to new replies.