I may be wrong but I don’t think you can modify the Calendar Widget at least not that easy as like passing a post type and a field to query for.
You have a few options:
- Create a Widget.
- Create a function like
get_calendar()
on line 1.406 on general-template.php file (wp 4) and pass it viaget_calendar
filter. - Install a plugin that offers an event post type with a calendar widget.
ps: don’t modify general-template.php is a bad practice and when wordpress gets updated you will loose all your modifications.
Read more about it:
- Using a different wordpress function instead of the default one
- Modify Native Calendar Widget for Event Post Types
If you have PHP and MySQL skills this should give you a starting point in how to solve this.
Sorry for bad english.