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.


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.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.