Core Function
View Source on Trac ↗ get_archives_link()
get_archives_link(
mixed $url,
mixed $text,
mixed $format = 'html',
mixed $before = '',
mixed $after = '',
mixed $selected = false
) Retrieves archive link content based on predefined or custom code.
Parameters 2 required
| Name / Type | Description |
|---|---|
| $url string | URL to archive. Required |
| $text string | Archive text description. Required |
| $format string | Optional. Can be 'link', 'option', 'html', or custom. Default 'html'. |
| $before string | Optional. Content to prepend to the description. Default empty. |
| $after string | Optional. Content to append to the description. Default empty. |
| $selected bool | Optional. Set to true if the current page is the selected archive page. Default false. |
Return Value
(string)
HTML link content for archive.
Function Information
Since Version
1.0.0
Source File
wp-includes/general-template.php
Advertisement