Warning: This function has been deprecated. Use wp_get_archives() instead.

get_archives() WordPress Function

The get_archives() function is a WordPress function that retrieves a list of archive files from the specified folder. It includes the current month, year, and day as well as any other archive files that may be present in the specified folder.

get_archives( string $type = '', string $limit = '', string $format = 'html', string $before = '', string $after = '', bool $show_post_count = false ) #

Retrieves a list of archives.


Description

Top ↑

See also


Top ↑

Parameters

$type

(string)(Optional)

Default value: ''

$limit

(string)(Optional)

Default value: ''

$format

(string)(Optional)

Default value: 'html'

$before

(string)(Optional)

Default value: ''

$after

(string)(Optional)

Default value: ''

$show_post_count

(bool)(Optional)

Default value: false


Top ↑

Return

(string|null)


Top ↑

Source

File: wp-includes/deprecated.php

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);
}


Top ↑

Changelog

Changelog
VersionDescription
2.1.0Use wp_get_archives()
0.71Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More