Best 2 Know

The Ultimate Blogging Resource

  • Advertising
  • WebHosting
  • Contact Us
  • Blogger
    • Blogger Templates
    • Blogger Tutorials
  • Browser
    • Firefox
    • Google Chrome
  • Google
  • Internet
    • Facebook
    • Twitter
  • Thesis
  • Windows
  • WordPress
    • WordPress Themes
    • WordPress Plugins
  • More
    • Linux
    • Review
    • Solutions
    • Announcements

How to Create and Cutomize Archive page template in thesis

Hi its been 5 long days that i m been not online for most of the time the problem was the electrical cutout at our building so after that incident i m bringing you again a Thesis Customization work. today we will learn to create and cutomize archive page templates in thesis as we know

An archive is a collection of historical records, as well as the place they are located.Archives contain primary source documents that have accumulated over the course of an individual or organization’s lifetime.

I have already told about How to create Archives page in WordPress

.Now today it will creating Archives Template in thesis.

The default thesis Archives template shows archive list by Month and then category for example you can go to Best 2 Know’s Archive Page here.but now we are gonna customize it too what we want like for showing latest 30 posts and Categories.

So for that just copy and paste the below code to custom_functions.php :

function my_archives_template() {
?>
	<h3 class="top"><?php _e('Latest 30 Posts', 'thesis'); ?></h3>
		<ul>
<?php query_posts('showposts=30'); ?>		  
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php $wp_query->is_home = false; ?>	  
 <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> - <?php the_time(); ?> - <?php echo $post->comment_count ?> <?php _e('comments', 'woothemes') ?></li>
<?php endwhile; endif; ?>
		</ul>
	<h3><?php _e('By Category:', 'thesis'); ?></h3>
		<ul>
			<?php wp_list_categories('title_li=0&show_count=1'); ?>
		</ul>
<?php
}
 
remove_action('thesis_hook_archives_template', 'thesis_archives_template');
add_action('thesis_hook_archives_template', 'my_archives_template');

function my_archives_template() { ?> <h3 class="top"><?php _e('Latest 30 Posts', 'thesis'); ?></h3> <ul> <?php query_posts('showposts=30'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $wp_query->is_home = false; ?> <li><a href="<?php the_permalink() ?>"><?php the_title(); ?></a> - <?php the_time(); ?> - <?php echo $post->comment_count ?> <?php _e('comments', 'woothemes') ?></li> <?php endwhile; endif; ?> </ul> <h3><?php _e('By Category:', 'thesis'); ?></h3> <ul> <?php wp_list_categories('title_li=0&show_count=1'); ?> </ul> <?php }remove_action('thesis_hook_archives_template', 'thesis_archives_template'); add_action('thesis_hook_archives_template', 'my_archives_template');

This will change your Archives page template , to one that will show your latest 30 Posts and after that the categories.

Hope you like it, I would love to have your feedback.

Subscribe via Email

Share this:

  • Twitter
  • Facebook
  • Pocket
  • Print
  • Email

Related

April 12, 2011 Ritesh Sanap Thesis Customization Archives template, custom_functions.php, How To, Thesis, Thesis Customization

Post navigation

Previous Previous post: How to add Separate Nav Menu for Categories in thesis
Next Next post: How to add Hello Bar in thesis / WordPress

Currently Trending

  • Windows Vista CD key
  • How to download Specific parts of YouTube videos
  • How to Increase Dropbox upload speed
  • How to add Attribution widget in blogger
  • How to Create Multiple Excerpts in WordPress
  • Random Post Widget for Blogger
  • How To Change Windows XP Shutdown Dialog Box
  • 100+ Best Online Games - Who Else Wants to Play ?
  • List Of All 255 Keyboard All Alt Key Codes
  • How to Change the Welcome/Login Screen in Windows XP ?

Random Posts

Blog Design Series

August 8, 2009 By Ritesh Sanap 9 Comments

Place Your FaceBook Chat On Your FireFox Sidbar With This Simple Guide

May 7, 2010 By Ritesh Sanap Leave a Comment

How to backup and restore my Internet Favorites / Bookmarks.

April 30, 2009 By Ritesh Sanap Leave a Comment

Create Your Own Icons In Paint

February 29, 2008 By Ritesh Sanap Leave a Comment

100+ Best Online Games – Who Else Wants to Play ?

July 27, 2008 By Ritesh Sanap 1 Comment

WordPress

HTTP2 Server Push for W3 Total Cache Minify plugin

August 17, 2016 By Ritesh Sanap 5 Comments

How to Disable Emojis in WordPress

January 6, 2016 By Ritesh Sanap Leave a Comment

JetPack Related posts and Sharing not working with NGINX

November 10, 2015 By Ritesh Sanap Leave a Comment

Simply Pure – WordPress Theme

November 2, 2014 By Ritesh Sanap 2 Comments

Advanced What should we Write about next? – WordPress Plugin

July 28, 2014 By Ritesh Sanap Leave a Comment

How to Disable Self Pingback or TrackBack

January 16, 2014 By Ritesh Sanap Leave a Comment

BlueStrap – WordPress Theme

January 1, 2014 By Ritesh Sanap 15 Comments

How to Create Multiple Excerpts in WordPress

December 24, 2013 By Ritesh Sanap Leave a Comment

How to Disable Auto Update in WordPress

November 21, 2013 By Ritesh Sanap Leave a Comment

How to Delete Feedbacks from JetPack Contact Form

November 19, 2013 By Ritesh Sanap 9 Comments

Recent Posts

  • HTTP2 Server Push for W3 Total Cache Minify plugin
  • How to show hidden files and folders in Mac OS X
  • How to Disable Emojis in WordPress
  • Canva – Online Photo Editor
  • JetPack Related posts and Sharing not working with NGINX

Archives

Recommends

  • DigitalOcean – Cloud Hosting
  • Dropbox – Cloud Storage
  • Elegant Themes – WordPress Themes
  • LastPass – Password Manager
  • Like us on Facebook
  • Follow on Twitter
  • +1 on Google
  • Subscribe via Email
  • RSS Feed

© 2021 Best 2 Know · All Rights Reserved · We ♥ DigitalOcean

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.