我正在尝试将我的自定义帖子类型事件加载到jquery插件完整日历中,但没有任何效果。我用这段代码制作了一个php文件
include "wp-load.php";
global $wpdb;
header(\'Content-Type:application/json\');
$events = array();
$result = new WP_Query(\'post_type=events&posts_per_page=-1\');
foreach($result->posts as $post) {
$events[] = array(
\'title\' => $post->post_title,
\'start\' => \'2018-03-12T20:00:00\',
);
}
echo json_encode($events);
exit;
但它没有加载任何内容