这是我的代码,嵌入wordpress模板页面。
<?php
include "Eventbrite.php";
$authentication_tokens = array('app_key' => 'XXXX',
'user_key' => 'XXXX');
$eb_client = new Eventbrite( $authentication_tokens );
try {
$events = $eb_client->user_list_events();
} catch ( Exception $e ) {
$events = array();
}
<?= Eventbrite::eventList( $events, 'eventListRow'); ?>
返回:
<div class='eb_event_list_item' id='evnt_div_123456789'>
<span class='eb_event_list_date'>Wed, March 22</span>
<span class='eb_event_list_time'> 7:00 pm</span>
<a class='eb_event_list_title' href='https://www.eventbrite.com/e/test-event-tickets-123456789?ref=ebapi'>Test Event</a>
<span class='eb_event_list_location'>Austin, TX</span>
</div>
提前致谢!
答案 0 :(得分:0)
如果这对其他人有帮助,我最终在创建活动时使用Eventbrite一侧的徽标上传选项,并使用$ evnt-&gt; logo:
<img src='" . $evnt->logo . "' alt='" . $evnt->title . "'>