<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Blogussion &#187; archives tutorial</title>
	<atom:link href="http://www.blogussion.com/tag/archives-tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.blogussion.com</link>
	<description>Blogging Discussion, Tips &#38; Tricks</description>
	<lastBuildDate>Wed, 08 Feb 2012 07:48:30 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Tutorial: Create a Very Informative Archives Page</title>
		<link>http://www.blogussion.com/favorites/create-informative-wordpress-archive-page/</link>
		<comments>http://www.blogussion.com/favorites/create-informative-wordpress-archive-page/#comments</comments>
		<pubDate>Sun, 14 Jun 2009 16:32:11 +0000</pubDate>
		<dc:creator>Alex</dc:creator>
				<category><![CDATA[Favorites]]></category>
		<category><![CDATA[archives tutorial]]></category>
		<category><![CDATA[thesis theme]]></category>
		<category><![CDATA[wordpress archives page]]></category>

		<guid isPermaLink="false">http://www.blogussion.com/?p=5939</guid>
		<description><![CDATA[I don&#8217;t mean to toot my own horn here, but have you seen our Archives page? It&#8217;s pretty awesome if I do so say so myself, and I received numerous emails and comments about how I made my Archives page. So today, I&#8217;m going to show you how! I will try to make this tutorial [...]


Related posts:<ol><li>
<a href='http://www.blogussion.com/design/404-error-page-exist/' rel='bookmark' title='How to Create an Informative &#8220;404 Error&#8221; Page'>How to Create an Informative &#8220;404 Error&#8221; Page</a></li>
<li>
<a href='http://www.blogussion.com/general/4-ways-customized-thesis-theme/' rel='bookmark' title='4 Great Ways I Customized my Thesis Theme'>4 Great Ways I Customized my Thesis Theme</a></li>
<li>
<a href='http://www.blogussion.com/general/wrap-post-title-image/' rel='bookmark' title='How To: Wrap the post title around an image'>How To: Wrap the post title around an image</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p></p><p><span class="drop_cap">I</span> don&#8217;t mean to toot my own horn here, but have you seen our <a href="http://www.blogussion.com/archives">Archives page</a>? It&#8217;s pretty awesome if I do so say so myself, and I received numerous emails and comments about how I made my Archives page. So today, I&#8217;m going to show you how!</p>
<p><span id="more-5939"></span></p>
<p>I will try to make this tutorial as detailed as possible so you can create an almost exact replica of our Archives page onto your own blog.</p>
<h3>Download this Entire Tutorial</h3>
<p>At the end, I am going to post a file you can download that will be compatible with a regular WordPress theme, and if you use <a href="http://diythemes.com/?a_aid=alexFraiser">Thesis</a>, the entire function!</p>
<h3>Checklist</h3>
<p>Here are some of the things you will need below to do this tutorial. Not everything is necessary, but I am writing the tutorial to match our Archives exact.</p>
<ol>
<h5>Plugins</h5>
<li><a href="http://wordpress.org/extend/plugins/smart-archives-reloaded/">Smart Archives Reloaded</a></li>
<li><a href="http://wordpress.org/extend/plugins/recent-posts-plugin/">Recent Posts Plugin</a></li>
<li>(Optional) <a href="http://wordpress.org/extend/plugins/random-posts-plugin/">Random Posts Plugin</a></li>
<p></p>
<h5>Files Needed</h5>
<li><strong>Standard WordPress Themes:</strong> <code>style.css</code>, <code>archives.php</code></li>
<li><strong>Thesis Theme Users:</strong> <code>custom.css</code>, <code>custom_functions.php</code></li>
</ol>
<h3>Setting up the Page</h3>
<p>I always like to set up the <acronym title="HyperText Markup Language">HTML</acronym> before I start styling the page, so I am going to break down everything on the page in this section and you can add whatever you want, and exclude anything you don&#8217;t want.</p>
<h4>A. Search Box</h4>
<p>Give the user the option to search your blog from your Archives page.</p>
<pre>&lt;h5&gt;Search Blogussion&lt;/h5&gt;
&lt;p&gt;Use this search form below to look for a specific posts with specific keywords in them.&lt;/p&gt;

&lt;form method="get" id="searchform" action="&lt;?php bloginfo('url'); ?&gt;/"&gt;
&lt;input size="20" type="text" value="To search, type and hit enter" onfocus="if(this.value==this.defaultValue)this.value='';" onblur="if(this.value=='')this.value=this.defaultValue;" name="s" id="s" /&gt;
&lt;/form&gt;</pre>
<h4>B. Display Smart Archives</h4>
<p>Moving along, we have the smart archives section. It looks like this, right under the Search form:</p>
<div id="attachment_5954" class="wp-caption aligncenter" style="width: 441px">
	<img class="size-full wp-image-5954" title="Example or Smart Archives Reloaded" src="http://www.blogussion.com/wp-content/uploads/2009/06/10cc8d750489efa28d36cac1b6db4988.png" alt="This plugin automatically links to monthly archives by the year." width="441" height="104" />
	<p class="wp-caption-text">This plugin automatically links to monthly archives by the year.</p>
</div>
<p>Adding this to your page is simple, just add the line <code>&lt;?php smart_archives(); ?&gt;</code> wherever you want it to appear.</p>
<p class="alert">By default, Smart Archives shows a list of your blog posts, and just the block showing the monthly archives. To just show the monthly archives, go into your Admin panel and go to Setting &rarr; Smart Archives &rarr; Format &rarr; Tick the &#8220;block&#8221; option and click &#8220;Save Changes.&#8221;</p>
<h4>C. &#8220;Search by&#8221; Box</h4>
<p>The box that shows &#8220;Search by Category,&#8221; &#8220;by Author&#8221; and &#8220;Random Posts&#8221; is extremely useful, and also the most informative part on this whole archives page. You can change whatever content you want to display in this box with little coding knowledge.</p>
<p>Here is the code to outline the box:</p>
<pre>&lt;div id="searchby"&gt;
 	&lt;div id="inner"&gt;
 		&lt;ul&gt;
 			&lt;li class="title"&gt;Search By Category&lt;/li&gt;
 			&lt;?php wp_list_categories('&amp;title_li='); ?&gt;
 		&lt;/ul&gt;

 		&lt;ul&gt;
 			&lt;li class="title"&gt;Search By Author&lt;/li&gt;
 			&lt;?php wp_list_authors('show_fullname=1&amp;optioncount=1&amp;'); ?&gt;
 		&lt;/ul&gt;

		&lt;ul&gt;
			 &lt;li class="title"&gt;Random Posts&lt;/li&gt;
			 &lt;?php random_posts(); ?&gt;
		 &lt;/ul&gt;
	 &lt;/div&gt;
 &lt;/div&gt;</pre>
<p>You can change whatever you would like to in there. I recommend you at least keep categories and Authors (if you have more than one author).</p>
<h4>D. Display Latest Posts</h4>
<p>This may or not be useful to you, it depends on what you like on your Archives page. The code below is assuming you have the highly customizable Latest Posts plugin (see checklist above).</p>
<p>Paste this wherever you want:</p>
<pre>&lt;h5&gt;10 Latest Posts&lt;/h5&gt;
 &lt;?php recent_posts(); ?&gt;</pre>
<p>For formatting like our Latest Post options (again, assuming you used the plugin from the checklist) follow these steps. Go to your Admin Panel &rarr; Settings &rarr; Recent Posts &rarr; Output (at top of page) &rarr; and type in the follow into &#8220;Output template:&#8221;</p>
<pre>
&lt;div class="recent"&gt;
	&lt;h3&gt;{link}&lt;/h3&gt;
	&lt;p&gt;{date} &amp;middot; {commentcount} Comments &amp;middot; &lt;a href="{url}#phighlights"&gt;Summary&lt;/a&gt;&lt;/p&gt;
	&lt;p&gt;{snippet} [...]&lt;/p&gt;
	&lt;p&gt;&lt;a href="{url}"&gt;Read Full Post &amp;rarr;&lt;/a&gt;&lt;/p&gt;
&lt;/div&gt;</pre>
<h4>E. Tag Cloud</h4>
<p>I think you should always have one of these things floating around (even as obnoxious looking as they are)!</p>
<pre>&lt;h5&gt;An Obnoxious Looking Tag Cloud&lt;/h5&gt;
 &lt;?php wp_tag_cloud(); ?&gt;</pre>
<h3>Styling the Page</h3>
<p>Now that we have our page set up, it&#8217;s time to add the <acronym title="Cascading Style Sheets">CSS</acronym> to it! This will make our code display properly instead of the jumbled up mess it probably is right now!</p>
<p class="note">The search box and Smart Archives do not need any custom styling. They will just inherit the styles from your own theme you are using now.</p>
<h4>A. Style the &#8220;Search by&#8221; Box</h4>
<p>This box has a few different things going on here, so I am going to break it down for you.</p>
<h5>Creating the Outline</h5>
<div id="attachment_5971" class="wp-caption alignleft" style="width: 122px">
	<img src="http://www.blogussion.com/wp-content/uploads/2009/06/f567f5c695bf7e730079f2a8ac9c3356.png" alt="The black box surrounding the white box is just to make it look good" title="Archives Outline" width="122" height="129" class="size-full wp-image-5971" />
	<p class="wp-caption-text">The black box surrounding the white box is just to make it look good</p>
</div>
<p>The outline in my opinion makes the box look pretty good. It should match any style as it is black and white. It&#8217;s a personal choice to include the outline, I think it does make it stand out a little bit. But it is very easy to remove it, so if you don&#8217;t want it then you just simply need to remove the <code> #searchby</code> line in your Style sheet.</p>
<p>Here is the <acronym title="Cascading Style Sheets">CSS</acronym> code to add that outline:</p>
<pre>
#searchby{background: #454343 url(images/blackGrad.gif) repeat-x; border: 1px solid #0A0A0A; border-top: 0; margin-bottom: 1.5em; overflow: hidden; padding: 1em }

#searchby #inner {background: #FFF; border: 1px solid #000; overflow: hidden }
</pre>
<p>Here is the black gradient used in the box, if you would like to use it on your blog as well:<br />
<div id="attachment_5972" class="wp-caption aligncenter" style="width: 200px">
	<img src="http://www.blogussion.com/wp-content/uploads/2009/06/blackGrad.gif" alt="Right Click ? Save Image As" title="Black Gradient" width="200" height="64" class="size-full wp-image-5972" />
	<p class="wp-caption-text">Right Click &rarr; Save Image As</p>
</div></p>
<h5>Align the Boxes into 3 Columns</h5>
<p>Without this <acronym title="Cascading Style Sheets">CSS</acronym>, your boxes are probably vertically aligned, instead of next to each other (horzontally aligned). With just one line of code, you can make these columns next to each other:</p>
<pre>
#searchby ul {float: left; list-style-position: inside; margin: 0; padding: 1em; width: 28%}
</pre>
<p>You can change the width and padding however you like until it fits your theme. I use percentages because of the way this theme in particular is coded, and you might want to use a different kind of formatting like PX or EM instead. It&#8217;s up to you though.</p>
<h5>Other Little Styles</h5>
<p>Here are just some other things you can add to make the box look better:</p>
<pre>
#searchby li { padding-bottom: 4px }

#searchby li.title{ font-size: 18px; list-style-type: none }
</pre>
<h5>The Whole Code</h5>
<pre>
#searchby{background: #454343 url(images/blackGrad.gif) repeat-x; border: 1px solid #0A0A0A; border-top: 0; margin-bottom: 1.5em; overflow: hidden; padding: 1em }

#searchby ul {float: left; list-style-position: inside; margin: 0; padding: 1em; width: 28%}

#searchby li { padding-bottom: 4px }

#searchby li.title{ font-size: 18px; list-style-type: none }

#searchby #inner {background: #FFF; border: 1px solid #000; overflow: hidden }
</pre>
<h4>B. Style Latest Posts</h4>
<p>There is just a few styles here, this will give it more formatting and make it look great.</p>
<pre>
.recent { border-bottom: 1px dashed #CCC; margin-bottom: 2em }

	.recent h3 a { font-size: 22px; line-height: 20px; text-decoration: none }

	.recent .metadata { color:#888; font-size:11px; text-transform:uppercase}
</pre>
<h3>Looks Pretty Good, Right?</h3>
<p>If you have everything working, then I am sure you will be happy with the results! Post here if you have any problems, or notice any mistakes in this tutorial. You can proceed to download the source code for the tutorial below.</p>
<h4>Download Options</h4>
<p>Do you use Thesis? Use this link below to get the entire function to this tutorial:</p>
<p><a href="http://www.blogussion.com/wp-content/extras/Thesis-Archives.zip">Download Thesis Compatible Archives</a></p>
<p><strong>Don&#8217;t</strong> use Thesis? Use this for other themes:</p>
<p><a href="http://www.blogussion.com/wp-content/extras/WPtheme-Archives.zip">Download</a></p>


<p>Related posts:<ol><li><p><a href='http://www.blogussion.com/design/404-error-page-exist/' rel='bookmark' title='How to Create an Informative &#8220;404 Error&#8221; Page'>How to Create an Informative &#8220;404 Error&#8221; Page</a></p></li>
<li><p><a href='http://www.blogussion.com/general/4-ways-customized-thesis-theme/' rel='bookmark' title='4 Great Ways I Customized my Thesis Theme'>4 Great Ways I Customized my Thesis Theme</a></p></li>
<li><p><a href='http://www.blogussion.com/general/wrap-post-title-image/' rel='bookmark' title='How To: Wrap the post title around an image'>How To: Wrap the post title around an image</a></p></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.blogussion.com/favorites/create-informative-wordpress-archive-page/feed/</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
	</channel>
</rss>

