Wednesday, August 15, 2012

Thesis Themes Customization: 12 | Create Archive Page in Thesis

I will use 1.8 Developer version of Thesis Theme

LogIn to your Dashboard and Go to Thesis > Custom File Editor
Thesis-tuto
Place this code in custom.css :
/* SAVE THIS IN CUSTOM.CSS FILE */
/* custom  sitemap and archives page */
.custom .sitemap h3 {margin-top: 0;}
.custom .sitemap ul {font-size: .85em; }
.custom .sitemapl { float: left; width: 30%;}
.custom .sitemapr { float: right; width: 70%;}

Select custom_functions.php form drop down menu and Click Edit Selected File.
thesis tuto

Place this code below custom_functions.php :
/* SAVE THIS IN CUSTOM_FUNCTIONS.PHP FILE */
remove_action('thesis_hook_archives_template', 'thesis_archives_template');
add_action('thesis_hook_after_post', 'custom_sitemap');
/* SITEMAP AND ARCHIVES PAGES */
function custom_sitemap() {
if (is_page('754')) { ?>
<div>
<div class="sitemapl">
<h3>Blog Pages:</h3>
<ul>
<?php wp_list_pages('title_li='); ?>
</ul>
<h3>Monthly Blog Archive:</h3>
<ul>
<?php wp_get_archives('type=monthly'); ?>
</ul>
<h3>Blog Category Archive:</h3>
<ul>
<?php wp_list_categories('sort_column=name&title_li='); ?>
</ul>
</div>
<div class="sitemapr">
<h3>Last 40 Posts:</h3>
<ul>
<?php wp_get_archives('type=postbypost&limit=40'); ?>
</ul>
</div>
</div>
<?php } }
 N.B: if (is_page('754(HERE-YOUR-SITEMAP-PAGR-ID)')) { ?>
  
Now save it.
[Please comment for any Problem]

No comments:

Post a Comment

!! COMMENT HERE FOR ANY PROBLEM !!

Featured post

WordPress yoast plugin remove date or article:published_time

Yoast is an essential plugin for WordPress SEO. It is one of the best SEO plugin for wordpress right now. But, after disabling date from ...