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
  • WhatsApp
  • Email

Related

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

Leave a Reply Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

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

  • How to download Specific parts of YouTube videos
  • How to Make Your Own Avatar
  • You might also like this Widget for blogger or Related post widget
  • How to Delete Feedbacks from JetPack Contact Form
  • List Of All 255 Keyboard All Alt Key Codes
  • 100+ Best Online Games - Who Else Wants to Play ?
  • How to Change the Welcome/Login Screen in Windows XP ?
  • Windows Vista CD key
  • Add/Remove page/Post View Counter Widget For Blogger
  • h4x0r ( Hacker ) - Blogger Template

Get Latest post in your Inbox

Random Posts

Use system restore when you cant boot your system

February 29, 2008 By Ritesh Sanap Leave a Comment

How to show Adsense in your Posts

February 27, 2011 By Ritesh Sanap 1 Comment

Submit To All Social Bookmarking Websites At Once

March 19, 2009 By Ritesh Sanap 4 Comments

How to RIP A MOVIE

May 7, 2010 By Ritesh Sanap Leave a Comment

Administrator privileges for guest

March 1, 2009 By Ritesh Sanap Leave a 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

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