Created
June 28, 2016 19:39
-
-
Save davebonds/697efcd111c2a034ba8bea49830fe2a1 to your computer and use it in GitHub Desktop.
Sitemap-esque page for Equity
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//* Template Name: Archive | |
//* Remove standard post content output | |
remove_action( 'equity_entry_content', 'equity_do_post_content' ); | |
add_action( 'equity_post_content', 'equity_page_archive_content' ); | |
/** | |
* This function outputs sitemap-esque columns displaying all pages, | |
* categories, authors, monthly archives, and recent posts. | |
* | |
* @since 1.6 | |
*/ | |
function equity_page_archive_content() { ?> | |
<h4><?php _e( 'Pages:', 'equity' ); ?></h4> | |
<ul> | |
<?php wp_list_pages( 'title_li=' ); ?> | |
</ul> | |
<h4><?php _e( 'Categories:', 'equity' ); ?></h4> | |
<ul> | |
<?php wp_list_categories( 'sort_column=name&title_li=' ); ?> | |
</ul> | |
<h4><?php _e( 'Authors:', 'equity' ); ?></h4> | |
<ul> | |
<?php wp_list_authors( 'exclude_admin=0&optioncount=1' ); ?> | |
</ul> | |
<h4><?php _e( 'Monthly:', 'equity' ); ?></h4> | |
<ul> | |
<?php wp_get_archives( 'type=monthly' ); ?> | |
</ul> | |
<h4><?php _e( 'Recent Posts:', 'equity' ); ?></h4> | |
<ul> | |
<?php wp_get_archives( 'type=postbypost&limit=100' ); ?> | |
</ul> | |
<?php | |
} | |
equity(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment