Skip to content

Instantly share code, notes, and snippets.

@vividvilla
Created January 10, 2014 06:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save vividvilla/8347965 to your computer and use it in GitHub Desktop.
Save vividvilla/8347965 to your computer and use it in GitHub Desktop.
Archive functions
// Display weekly archives
<?php wp_get_archives('type=weekly'); ?>
// Last 10 weeks archive
<?php wp_get_archives('type=weekly&limit=10'); ?>
// Monthly archive with post count
<?php wp_get_archives('show_post_count=1'); ?>
// Yearly archives
<?php wp_get_archives('type=yearly'); ?>
// Display all posts by date
<?php wp_get_archives('type=postbypost'); ?>
// Display all posts alphabetically
<?php wp_get_archives('type=alpha'); ?>
// Display only top level categories
<?php wp_list_categories('depth=1'); ?>
// Display Pages and subpages
<?php wp_list_pages(); ?>
// Display only top level pages
<?php wp_list_pages('depth=1' ); ?>
// Display tag cloud
<?php wp_tag_cloud(); ?>
// Display last 30 days post
<?php wp_get_archives('type=daily&limit=30'); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment