I need to use the default calendar widgets, but instead to highlight the article's date, I would show the events date

What's the best way to achieve this?

Thanks in advance :)

  • Welcome to WP.SE. What exactly are "events"? A taxonomy term? A post type post? Where does it come from (shown in code)? Please (always) answer with an edit to your question. Also make sure to read How to Ask to attract the best possible answers.
    – kaiser
    Oct 31, 2014 at 20:11

1 Answer 1


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 via get_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:

If you have PHP and MySQL skills this should give you a starting point in how to solve this.

Sorry for bad english.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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