WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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
up vote 2 down vote accepted

You can put a custom function into your functions.php to show a calendar with CPTs.

Details here.

share|improve this answer
Then I just reference get_calendar(); ? Or is there now a something I put inside that tag: get_calendar('event')? – TJ Sherrill Jul 15 '11 at 19:07
No, you will use it like this: echo ucc_get_calendar( $post_types = array('event')); – Pippin Jul 15 '11 at 19:15
Pippen, I appreciate your quick response. that makes a ton of sense. I am getting a Fatal error: Call to undefined function ucc_get_calendar() in the file I am using it on: seattleite.com/event-testing – TJ Sherrill Jul 15 '11 at 20:12
You need to copy all of the code that is listed on the link in my answer into your functions.php – Pippin Jul 15 '11 at 22:40
it was my fault, had the code inside another function... – TJ Sherrill Jul 18 '11 at 3:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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