duandi8613 2018-11-14 15:30 采纳率: 100%
浏览 72

活动日历获取场地URL和组织者名称

I'm working on a Wordpress website that shows events on the homepage. I've installed the plugin The Events Calendar. This one seems to work perfectly. However, It seems impossible to retrieve some specific data from the event.

<?php
$events = tribe_get_events(array(
    'posts_per_page' => 3,
    'start_date' => date('Y-m-d H:i:s')
));

if (empty($events)) {
    _e('There are no events plannend', 'uma-theme');
} else
    foreach ($events as $event) {
?>
    <h3 class="calendar-list__item__title">
         <?php
            echo get_the_title($event);
         ?>
    </h3>

    <span class="calendar-list__item__date">
        <span class="day">
            <?php
                echo tribe_get_start_date($event, false, 'j');
            ?>
        </span>
        <span class="month">
            <?php
                echo tribe_get_start_date($event, false, 'M');
            ?>.
        </span>
     </span>

     <div class="">
          //echo tribe_get_event_meta( tribe_get_venue_id( $event->ID ), '_VenueURL', true );
          //echo get_the_title( $organizer );
     </div>
     <?php
    }
?>

I've already checked there documentation, but none of these things work. I've commented the non-working stuff above.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥100 为什么这个恒流源电路不能恒流?
    • ¥15 有偿求跨组件数据流路径图
    • ¥15 写一个方法checkPerson,入参实体类Person,出参布尔值
    • ¥15 我想咨询一下路面纹理三维点云数据处理的一些问题,上传的坐标文件里是怎么对无序点进行编号的,以及xy坐标在处理的时候是进行整体模型分片处理的吗
    • ¥15 CSAPPattacklab
    • ¥15 一直显示正在等待HID—ISP
    • ¥15 Python turtle 画图
    • ¥15 stm32开发clion时遇到的编译问题
    • ¥15 lna设计 源简并电感型共源放大器
    • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)