Codex tools: Log in / create account
Contents |
Displays or returns the month and year title for the current page. This tag only works when the m or archive month argument has been passed by WordPress to the current page (this occurs when viewing a monthly archive page).
Note: This tag works only on date archive pages, not on category templates or others.
<?php single_month_title( $prefix, $display ) ?>
<?php single_month_title(
'prefix' => ,
'display' => true ); ?>
The generated title will be:
prefix + MONTH + prefix + YEAR
If prefix parameter is '*', an example would be:
*February*2004
Displays the title, placing month and year on new lines.
<p><?php single_month_title('<br />') ?></p>
Returns the title, which is assigned to the $my_month variable. The variable's value is then displayed with the PHP echo command.
<?php $my_month = single_month_title('', false); echo $my_month; ?>
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