Languages: English • 日本語 (Add your language)
Fungsi ini menampilkan daftar arsip berdasarkan penanggalan. Tag ini juga bisa digunakan di templat.
 <?php wp_get_archives( $args ); ?> 
 <?php $args = array(
    'type'            => 'monthly',
    'limit'           => ,
    'format'          => 'html', 
    'before'          => ,
    'after'           => ,
    'show_post_count' => false,
    'echo'            => 1
); ?>
Secara standar, kegunaan fungsi ini adalah:
Displays archive list by month, displaying only the last twelve.
<?php wp_get_archives('type=monthly&limit=12'); ?>
Displays archive list by date, displaying only the last fifteen days.
<?php wp_get_archives('type=daily&limit=15'); ?>
Displays archive list of the last twenty most recent posts listed by post title.
<?php wp_get_archives('type=postbypost&limit=20&format=custom'); ?>
Displays a drop-down box of monthly archives, in select tags, with the post count displayed.
<select name="archive-dropdown" onchange="document.location.href=this.options[this.selectedIndex].value;"> <option value=""><?php echo esc_attr( __( 'Select Month' ) ); ?></option> <?php wp_get_archives( 'type=monthly&format=option&show_post_count=1' ); ?> </select>
Displays ALL posts alphabetically, especially if you want to have an archive that serves like a sitemap.
<?php wp_get_archives('type=alpha'); ?>
Since: 1.2.0
wp_get_archives() is located in wp-includes/general-template.php.