how can I create a calendar for a cpt, using get_calendar or other


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.

in progress 0
, TJ Sherrill 10 years 2011-07-15T13:15:50-05:00 0 Answer 74 views 0

Answer ( 1 )


    Disclaimer: 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.

Leave an answer