Codex

Function Reference/get calendar

Contents

Description

Displays the calendar (defaults to current month/year). Days with posts are styled as such. This tag can be used anywhere within a template.

Usage

 <?php get_calendar(); ?> 

Parameters

$initial
(boolean) (optional) If true, the day will be displayed using a one-letter initial; if false, an abbreviation based on your localization will be used.
Default: True
  • False - causes "Sunday" to be displayed as "Sun"
  • True - causes it to be "S"

Examples

Default Usage

Displays calendar highlighting any dates with posts.

 <?php get_calendar(); ?> 

Displays Weekday Abbrevations

Display days using one-letter initial only; in 1.5, displays initial based on your WordPress Localization.

<?php get_calendar(true); ?>

Related

the_time, the_date, the_date_xml, the_modified_time, the_modified_date, the_modified_author, single_month_title, get_the_time, get_day_link, get_month_link, get_year_link, get_calendar

See also index of Function Reference and index of Template Tags.