カスタムポストタイプに月別アーカイブを表示する wp_get_archives

/ WordPress / Comment[0]

結構使うのでメモ

<ul>
<?php $args = array(
      'type'            => 'monthly',
      'limit'           => '10',
      'format'          => 'html',
      'before'          => '<li>',
      'after'           => '</li>',
      'show_post_count' => false,
      'echo'            => 1,
      'order'           => 'DESC'
    );
    wp_get_archives( $args . '&post_type=custompost' );
  ?>
</ul>
関連記事

コメント

:
:
:
:
:
管理人のみ表示を許可