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.

1 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 a Comment