get_month_link

get_month_link

TIME/DATE TAG

What It Does

Retrieves the monthly archive URL for a specified date.

Code

<?php get_month_link(‘year’, ‘month’); ?>

If no year or month paremeters are specified, the archive for the current month will be retrieved.

Example

To display an archive link to March 2009, you would use:

<a href=”<?php echo get_month_link(’2009′, ’03′); ?>”>Archive for March 2009</a>

NOTE: The month must be specified with its numerical value (ie. “03″ instead of “March”).

To display an archive link to the current month, you would use:

<a href=”<?php echo get_month_link(”, ”); ?>”>This Month’s Archives</a>