Wordpress事件管理器存档页面

时间:2017-07-17 17:33:56

标签: php wordpress custom-wordpress-pages

我正在使用“事件管理器”页面,我正在尝试按月和年创建事件的存档页面,就像发布帖子一样。我想要存档页面'要在https://www.example.com/events/2017/04/

中的网址

这是我到目前为止所拥有的。我的文件保存为archive-event.php。但是,当我尝试去https://www.example.com/events/2017/时,我得到了404。

$Currenturl = $_SERVER["REQUEST_URI"];
$chunks = array_filter(explode('/', $Currenturl));
$archiveYear=$chunks[1];
$archiveMonth=$chunks[2];
$archiveDay=$chunks[3];

echo EM_Events::output(array('year'=>$archiveYear, 'order'=>'DESC' ));

0 个答案:

没有答案