Created
August 18, 2012 06:51
-
-
Save keirwhitaker/3384986 to your computer and use it in GitHub Desktop.
Category Page
This file contains 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: Category Page | |
*/ | |
get_template_part('parts/shared/html-header'); | |
get_template_part('parts/shared/header'); | |
$args = array( | |
'type' => 'post', | |
'child_of' => 0, | |
'orderby' => 'name', | |
'order' => 'ASC', | |
'hide_empty' => 1, | |
'hierarchical' => 1, | |
'exclude' => '', | |
'include' => '', | |
'number' => '', | |
'pad_counts' => false ); | |
$categories = get_categories($args); | |
$post_count = wp_count_posts()->publish; | |
?> | |
<section class="primary group archive"> | |
<article> | |
<?php foreach($categories as $category): ?> | |
<h2><a href="<?php echo get_category_link($category->cat_ID); ?>" rel="tag"><?php echo $category->cat_name; ?></a></h2> | |
<?php endforeach; ?> | |
</article> | |
</section> | |
<section class="secondary group"> | |
<?php | |
get_template_part('parts/shared/ad'); | |
get_template_part('parts/shared/about'); | |
get_template_part('parts/shared/social-links'); | |
get_template_part('parts/shared/blog-categories'); | |
get_template_part('parts/shared/projects'); | |
?> | |
</section> | |
<?php | |
get_template_part('parts/shared/footer'); | |
get_template_part('parts/shared/html-footer'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment