Skip to content

Instantly share code, notes, and snippets.

@arsieorgano
Created February 28, 2015 09:08
Show Gist options
  • Save arsieorgano/8ca94824ad5fdb1ccd91 to your computer and use it in GitHub Desktop.
Save arsieorgano/8ca94824ad5fdb1ccd91 to your computer and use it in GitHub Desktop.
Adding Custom Archive Page for AquaMag Theme Theme-Junkie
<?php
/*
Template Name: Archives Template
*/
?>
<?php get_header(); ?>
<div id="primary" class="content-area uk-width-1-1 uk-width-large-7-10 site-content-left clearfix">
<main id="main" class="site-main main-content" role="main">
<div id="content">
<h1 class="page-title"><?php the_title(); ?></h1>
<div class="entry-content">
<?php the_content(''); ?>
<h3><?php _e('Looking for something? Try Searching...', 'aquamag'); ?></h3>
<?php get_search_form(); ?><br />
<h3><?php _e('The Latest Articles', 'aquamag'); ?></h3>
<ul>
<?php query_posts( 'showpost=30' ); ?>
<?php while ( have_posts() ) { the_post(); ?>
<li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> - <?php the_time('Y.m.d'); ?> - <?php _e( 'Comments', 'aquamag' ); ?> (<?php echo $post->comment_count; ?>)</li>
<?php } ?>
</ul><!-- Latest Posts -->
<div class="clear"></div>
<h3><?php _e('Archives based on Categories', 'aquamag'); ?></h3>
<ul>
<?php wp_list_categories('title_li=&show_count=true'); ?>
</ul>
</div><!-- Categories -->
<!-- <div class="right" style="width:50%;">
<h3><?php _e('Monthly Archives', 'aquamag'); ?></h3>
<ul>
<?php wp_get_archives('type=monthly&show_post_count=true'); ?>
</ul>
</div> --><!-- Monthly Archives -->
<div class="clear"></div>
</div><!-- .entry-content -->
</div><!-- #content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment