≡ Menu

Thesis Theme: Customize Archive Page

When we use the Thesis theme, so when we want to create the archive pages of our website, theses themes have provided a template for our archives page.

If we want to slightly modify the archive page, please follow the steps below:

1. Copy and paste this code into your file custom_functions.php

function my_archive() {
?>
<div class="archiver">
<div class="archivel>
 <h3>By Category:</h3>
 <ul>
 <?php wp_list_categories('sort_column=name&title_li='); ?>
 </ul>

 <h3>By Month:</h3>
 <ul>
 <?php wp_get_archives('type=monthly'); ?>
 </ul>
 <h3>By Tag:</h3>
 <ul>
 <?php wp_tag_cloud('number=0')?>
 </ul>

</div>

<div class="archiver>

 <h3>By Post: (Last 50 articles)</h3>
 <ul>
 <?php wp_get_archives('type=postbypost&limit=50'); ?>
 </ul>
</div>
</div>
<?php
}
remove_action('thesis_hook_archives_template', 'thesis_archives_template');
add_action('thesis_hook_archives_template', 'my_archive');

Copy and paste this code into your custom.css

.custom .archive h3 {margin-top: 0;}
.custom .archive ul {font-size: .85em; }
.custom .archivel { float: left; width: 40%;}
.custom .archiver { float: right; width: 60%;}

You can see results like this Archive Page

Credit: http://thesisthemehq.com/jazz-up-your-archives-page/

{ 0 comments… add one }

Leave a Comment

*