Title: Write function to change sidebar calendar
Last modified: August 20, 2016

---

# Write function to change sidebar calendar

 *  [justmigrating](https://wordpress.org/support/users/justmigrating/)
 * (@justmigrating)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/write-function-to-change-sidebar-calendar/)
 * I am creating a custom, but generic, theme. I wish to change the default sidebar
   calendar widget. The default title code is set as <h2> </h2> and I wish to have
   it as <h2>Calendar</h2>.
 * I believe such a change involves writing a function in the functions.php file,
   but I am new to writing WordPress functions. I have searched and googled this
   and have not found the way to write such a function. Can someone please help?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [lgkevincc](https://wordpress.org/support/users/lgkevincc/)
 * (@lgkevincc)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/write-function-to-change-sidebar-calendar/#post-2093637)
 * The content between <h1> and </h2> can be changed in the themes->widgets section
   when you drag the widgets. Not sure why you need to write a function to change
   it. Maybe I didn’t get your meaning..
 *  Thread Starter [justmigrating](https://wordpress.org/support/users/justmigrating/)
 * (@justmigrating)
 * [15 years, 2 months ago](https://wordpress.org/support/topic/write-function-to-change-sidebar-calendar/#post-2093716)
 * Thank you, of course you are right! I wasn’t thinking well last night.
 * Although what if I wanted the calendar caption (month and year) to be in the 
   heading (<h2>May 2011</h2>) rather than in the table caption. The default calendar
   code begins…
 * <div class=”widget”><h2>Calendar</h2><div id=”calendar_wrap”><table id=”wp-calendar”
   summary=”Calendar”><caption>May 2011</caption>
 * Moving the month and year to the heading, would that require a function?

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Write function to change sidebar calendar’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [justmigrating](https://wordpress.org/support/users/justmigrating/)
 * Last activity: [15 years, 2 months ago](https://wordpress.org/support/topic/write-function-to-change-sidebar-calendar/#post-2093716)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
