好的,希望这对别人有帮助。除非要直接查询数据库,否则技巧是包括以下内容:
$event = Ai1ec_Events_Helper::get_event($post->ID);
此后,您可以检索变量,例如:
<?php query_posts(\'post_type=ai1ec_event\');?>
<?php while ( have_posts() ) : the_post(); ?>
<?php $event = Ai1ec_Events_Helper::get_event($post->ID); ?>
<?php echo \'<h5><a href="\'.get_permalink().\'">\'.get_the_title().\'</a></h5>\'; ?>
<?php if( $event->multiday ) echo \'ai1ec-multiday\' ?> <?php if( $event->allday ) echo \'ai1ec-allday\' ?>
<?php echo esc_html( $event->start_time ) ?>
<?php echo $event->timespan_html ?>
<?php echo $event->venue; ?>
<?php if( $recurrence ): ?>
<?php echo $recurrence ?>
<?php endif ?>
<?php if( $event->cost ): ?>
<?php echo esc_html( $event->cost ) ?>
<?php endif ?>
<?php if( $contact ): ?>
<?php echo $contact ?>
<?php endif ?>
<?php if( $categories ): ?>
<?php echo $categories ?>
<?php endif ?>
<?php if( $tags ): ?>
<?php echo $tags ?>
<?php endif ?>
<?php endwhile; ?><!-- End the Loop -->