admin管理员组文章数量:1336357
I have a custom post type with its own date field. the date is setup for unix YYYY/mm/dd
I need to create a simple month calendar that shows days that have a cpt on them. get_calendar works for posts but not a CPT.
I have a custom post type with its own date field. the date is setup for unix YYYY/mm/dd
I need to create a simple month calendar that shows days that have a cpt on them. get_calendar works for posts but not a CPT.
Share Improve this question asked Jul 15, 2011 at 18:15 TJ SherrillTJ Sherrill 5856 gold badges14 silver badges30 bronze badges1 Answer
Reset to default 1Disclaimer: I have not tested this out myself.
It looks like you will have to hook the calendar and push your content into it. The filter that gets called by the calendar is get_calendar
.
So, at a guess, something like this:
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 );
I hope that helps.
本文标签: custom post typeshow can I create a calendar for a cptusing getcalendar or other
版权声明:本文标题:custom post types - how can I create a calendar for a cpt, using get_calendar or other 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742252371a2441000.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论