On this page
get_archives( string $type = '', string $limit = '', string $format = 'html', string $before = '', string $after = '', bool $show_post_count = false ): string|null
This function has been deprecated. Use wp_get_archives() instead.
Retrieves a list of archives.
Description
See also
Parameters
$typestring Optional-
Default:
'' $limitstring Optional-
Default:
'' $formatstring Optional-
Default:
'html' $beforestring Optional-
Default:
'' $afterstring Optional-
Default:
'' $show_post_countbool Optional-
Default:
false
Return
string|null
Source
File: wp-includes/deprecated.php. View all references
function get_archives($type='', $limit='', $format='html', $before = '', $after = '', $show_post_count = false) {
_deprecated_function( __FUNCTION__, '2.1.0', 'wp_get_archives()' );
$args = compact('type', 'limit', 'format', 'before', 'after', 'show_post_count');
return wp_get_archives($args);
}
Related
Uses
| Uses | Description |
|---|---|
| wp_get_archives() wp-includes/general-template.php | Displays archive links based on type and format. |
| _deprecated_function() wp-includes/functions.php | Marks a function as deprecated and inform when it has been used. |
Changelog
| Version | Description |
|---|---|
| 2.1.0 | Use wp_get_archives() |
| 0.71 | Introduced. |
© 2003–2022 WordPress Foundation
Licensed under the GNU GPLv2+ License.
https://developer.wordpress.org/reference/functions/get_archives