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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
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
1 2 3 4 |
.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/