我有一个自定义的帖子类型,它有自己的日期字段。日期是为unix YYYY/mm/dd设置的
我需要创建一个简单的月历,显示有cpt的日期。get\\u calendar适用于帖子,但不适用于CPT。
我有一个自定义的帖子类型,它有自己的日期字段。日期是为unix YYYY/mm/dd设置的
我需要创建一个简单的月历,显示有cpt的日期。get\\u calendar适用于帖子,但不适用于CPT。
免责声明:我自己没有测试过。
看起来您必须挂接日历并将内容推入其中。日历调用的筛选器为get_calendar
.
所以,大概是这样的:
function filter_get_calendar( $cache_key ) {
// Do awesome things here...
return $cache_key;
};
// add the filter
add_filter( \'get_calendar\', \'filter_get_calendar\', 10, 1 );
我希望这有帮助。我是在吸快克烟还是这不管用?:/这一切似乎都很简单:function admin_head() { ?> <link type=\"text/css\" rel=\"stylesheet\" href=\"<?php bloginfo(\'template_url\'); ?>/css/jquery-ui-1.8.9.custom.css\" /> <script type=\"text/javascript\" src=\"