<?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>Blogsessive &#187; tricks</title>
	<atom:link href="http://blogsessive.com/tag/tricks/feed/" rel="self" type="application/rss+xml" />
	<link>http://blogsessive.com</link>
	<description>Visit Blogsessive for daily WordPress blogging tips.</description>
	<lastBuildDate>Sun, 22 Apr 2012 07:56:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to add backward compatibility to a WordPress 3.0 ready theme</title>
		<link>http://blogsessive.com/blogging-tools/backward-compatibility-wordpress-30-ready-theme/</link>
		<comments>http://blogsessive.com/blogging-tools/backward-compatibility-wordpress-30-ready-theme/#comments</comments>
		<pubDate>Tue, 03 Aug 2010 20:12:12 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blog Design]]></category>
		<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[WordPress Themes]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[custom menus]]></category>
		<category><![CDATA[post thumbnails]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=1787</guid>
		<description><![CDATA[Do you need quality design resources? Graphic River has them. Tons! And cheap...The latest major release of our favorite blogging platform &#8211; WordPress 3.0 &#8211; has brought quite a few new features to the table. Among them, the custom navigation menus and the post thumbnails (featured image), the latter being available since version 2.9 came [...]]]></description>
			<content:encoded><![CDATA[<p>With the StudioPress WordPress themes you can really <a href="http://blogsessive.com/go-studiopress/" title="Take Your Blog to a Higher Level" target="ejejcsingle"><strong>take your blog to a higher level</strong></a>!<p>The latest major release of our favorite blogging platform &#8211; WordPress 3.0 &#8211; has brought quite a few new features to the table. Among them, the custom navigation menus and the post thumbnails (featured image), the latter being available since version 2.9 came out. This started a whole new trend between theme developers, most of them rushing to announce WordPress 3.0 ready themes.</p>
<p>In all this rush, some of the themes released suffered from one big problem: backward compatibility. Why is that important and how can we give some backward compatibility to our WordPress 3.0 ready themes?<span id="more-1787"></span></p>
<h3>Importance of backward compatibility</h3>
<p>While I feel that generally offering some sort of backward compatibility is just a common sense policy, in this case it&#8217;s more than that. Let me explain why.</p>
<p>Not everyone uses the latest WordPress release, and that is for various reasons:</p>
<ul>
<li>Failed to update, or waiting to make sure it&#8217;s &#8220;stable&#8221;;</li>
<li>Doesn&#8217;t really get the importance of an up to date software;</li>
<li>Certain plugins they use are not yet 3.0/3.0.1 compatible.</li>
</ul>
<p>This doesn&#8217;t mean they don&#8217;t want to try and use your beautiful 3.0 ready WordPress theme, or that they shouldn&#8217;t. But you see, the biggest trick resides right here, in this terminology: &#8220;3.0 ready&#8221;. The actual meaning of this is that the theme is compatible with the 3.0 version, not that it requires 3.0 or higher to function properly, and this leads a lot of people into a trap that will cause their blogs and websites to break.</p>
<p>So, the common sense thing to do would be to take the time and apply certain checks and fallback solutions to our themes. Lets see how we can do that.</p>
<h3>Adding WordPress 3.0 features with fallback support</h3>
<p>Both of the above mentioned features &#8211; custom menus and post thumbnails &#8211; are based on a WordPress function added once 2.9 was released: <strong>add theme support();</strong></p>
<h4>Adding post thumbnails support</h4>
<p>In order to add post thumbnail support to your theme, you&#8217;d write this in your <em>functions.php</em> file:</p>
<pre class="brush: php">
// Adds support for post thumbnails
add_theme_support(&#039;post-thumbnails&#039;);</pre>
<p>Simple adding this will cause any WordPress installation prior to 2.9 to break, as the <em>add_theme_support()</em> function was not part of the WordPress core back then. The fix? As easy as this:</p>
<pre class="brush: php">
/* Checks if the installation has the function defined.
If true, continues to add the support for post thumbnails. */
if(function_exists(add_theme_support)) :
	add_theme_support(&#039;post-thumbnails&#039;);
endif;</pre>
<h4>Adding custom menus support</h4>
<p>In order to also add support for the custom menus feature, you&#8217;d normally write this:</p>
<pre class="brush: php">// Add theme support for custom menus
add_theme_support( &#039;menus&#039; );

// Register a custom menu name/location
register_nav_menus(array(
	&#039;custom-menu&#039; =&gt; __( &#039;My Custom Menu&#039; ),
));
</pre>
<p>In this case, we obviously need to check for core support of both functions: <em>add_theme_support()</em> and <em>register_nav_menus()</em>. Let see how we can do that, also including in this check the post thumbnails:</p>
<pre class="brush: php">
if(function_exists(add_theme_support)) {
	add_theme_support(&#039;post-thumbnails&#039;); // Support for post thumbnails

	if(function_exists(add_theme_support)) {
		add_theme_support( &#039;menus&#039; ); // Support for custom menus
		register_nav_menus(array(
			&#039;custom-menu&#039; =&gt; __( &#039;My Custom Menu&#039; ),
		));
	}
}
</pre>
<p>In case you wonder why I chose to add support for menus only after checking if <em>register_nav_menus()</em> is defined, it&#8217;s simply because there&#8217;s no point in adding support for a feature that you won&#8217;t be able to use. Remember, <em>add_theme_support()</em> was added in 2.9, while <em>register_nav_menus()</em> became available only in 3.0.</p>
<p>But how about adding compatibility in the front-end of your theme?</p>
<p>When using post thumbnails, never call them without checking if the function exists first:</p>
<pre class="brush: php">
// Performs a check to see if the function is available and there&#039;s also a thumbnail attached
if (function_exists(the_post_thumbnail) AND has_post_thumbnail()) {
	the_post_thumbnail();
}
</pre>
<p>For the custom menus, the thing is just a tad trickier, but simple as well. I&#8217;m usually using a function that I wrote to specifically check for custom menus support, and even though the <em>wp_nav_menu()</em> function provides a fallback solution, defaulted to <em>wp_page_menu()</em>, this fallback will only activate for 3.0 installations without any menus created and allocated to the reserved space. The fallback won&#8217;t set off if you&#8217;re using a version prior to 3.0.</p>
<p>Due to my preference of <em>wp_list_pages()</em> over <em>wp_page_menu()</em> &#8211; for more customization options &#8211; the following function will apply a compatibility fallback to wp_list_pages:</p>
<pre class="brush: php">
function my_nav_menu() {
	// Check if installation has wp_nav_menu() defined.
	// If true, generate the menu, but don&#039;t print it yet;
	if(function_exists(wp_nav_menu)) {
		$my_nav_menu = wp_nav_menu(array(&#039;menu&#039; =&gt; &#039;Top Menu&#039;, &#039;container&#039; =&gt; &#039;&#039;, &#039;fallback_cb&#039; =&gt; &#039;wp_list_pages&#039;, &#039;depth&#039; =&gt; 2, &#039;echo&#039; =&gt; false));
	}
	// If false, generate the menu using wp_list_pages, but don&#039;t print it yet;
	else {
		$my_nav_menu = &#039;&lt;ul class=&quot;menu&quot;&gt;&#039;.wp_list_pages(&#039;sort_column=menu_order&amp;title_li=&amp;echo=0&amp;depth=2&#039;).&#039;&lt;/ul&gt;&#039;;
	}
	// Prints out the menu;
	echo $my_nav_menu;
}
</pre>
<p>Now, in the front end. instead of calling your menu with <em>wp_nav_menu()</em> you&#8217;ll now use <em>my_nav_menu()</em> to display a backward compatible version.</p>
<h3>Conclusions</h3>
<p>Caught in the rush of doing something nice and new, like a child discovering a shiny new toy, we can miss out some of the most basic problems. Most of them are really easy to solve, like the above mentioned and it would be common sense to make use of them.</p>
<p>And remember: <strong>if ( function_exists(function_name) )</strong> is your geeky <abbr title="Best Friends Forever"><strong>B.F.F.</strong></abbr></p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=1787&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tools/backward-compatibility-wordpress-30-ready-theme/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>WordPress How To: Latest Posts by Category Archive</title>
		<link>http://blogsessive.com/blogging-tools/latest-posts-by-category-archive/</link>
		<comments>http://blogsessive.com/blogging-tools/latest-posts-by-category-archive/#comments</comments>
		<pubDate>Sat, 14 Feb 2009 02:47:30 +0000</pubDate>
		<dc:creator>Alex, Blogsessive</dc:creator>
				<category><![CDATA[Blog Design]]></category>
		<category><![CDATA[Blogging Tools]]></category>
		<category><![CDATA[Coding Tips]]></category>
		<category><![CDATA[archive]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[tips]]></category>
		<category><![CDATA[tricks]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://blogsessive.com/?p=1047</guid>
		<description><![CDATA[With the StudioPress WordPress themes you can really take your blog to a higher level!One technique that is most common with WordPress magazine or news style themes is the display of an archive of the latest posts by category, as simple titles or with post excerpts. This is useful for the previously mentioned theme styles, [...]]]></description>
			<content:encoded><![CDATA[<p>Blogsessive recommends WP WebHost for <a href="http://blogsessive.com/go-wpwebhost/" title="WordPress Hosting" target="_blank"><strong>quality WordPress blog hosting</strong></a>!</p><p><a title="WordPress - Latest posts by category" href="http://blogsessive.com/wp-content/uploads/2009/02/latest-posts-by-category-archive.gif" target="_blank"><img style="float: right; margin-left: 20px; border: 1px solid #ebe6dc; padding: 5px;" title="Latest posts by category archive" src="http://blogsessive.com/wp-content/uploads/2009/02/latest-posts-by-category-archive-150x150.gif" alt="WordPress - Latest posts by category" width="150" height="150" /></a>One technique that is most common with WordPress magazine or news style themes is the display of an archive of the latest posts by category, as simple titles or with post excerpts. This is useful for the previously mentioned theme styles, but not only. It can be used to set up custom blog homepages, 404 pages, landing pages or even a special archive page.</p>
<p>This tutorial will help you build a &#8216;<strong>Latest Posts by Category Archive</strong>&#8216; in a very easy way. The widths in the CSS styling presented below have been calculated based on the default WordPress theme, assuming that is the most common theme available to anyone.</p>
<p>If you are looking for a plugin to generate such an archive, please check out: <a href="http://blogsessive.com/blogging-tools/wp-plugin-latest-posts-by-category-archive/" target="_blank" title="WordPress Plugin: Latest Posts by Category Archive"><strong>WP Plugin: Latest Posts by Category Archive</strong></a>.</p>
<h3>Setting up the page template</h3>
<p>Open up you favorite code editor and create a blank document. Save the document as &#8216;category-archive.php&#8217; (or any other name you&#8217;d prefer) in the default WordPress theme directory (wp-content/themes/default).</p>
<p>The first step is to asign our new template a name and a page-like structure, so based on the default theme&#8217;s page template, the code you should paste in your new document is:</p>
<pre class="brush: php">
&lt;?php
/*
Template Name: Category Archive
*/
?&gt;

&lt;?php get_header(); ?&gt;

&lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot;&gt;

	&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
	&lt;div class=&quot;post&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
	&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
		&lt;div class=&quot;entry&quot;&gt;
			&lt;?php the_content(&#039;&lt;p class=&quot;serif&quot;&gt;Read the rest of this page &amp;raquo;&lt;/p&gt;&#039;); ?&gt;

			&lt;?php wp_link_pages(array(&#039;before&#039; =&gt; &#039;&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; &#039;, &#039;after&#039; =&gt; &#039;&lt;/p&gt;&#039;, &#039;next_or_number&#039; =&gt; &#039;number&#039;)); ?&gt;

		&lt;/div&gt;
	&lt;/div&gt;
	&lt;?php endwhile; endif; ?&gt;

	&lt;!-- Category Archive Start --&gt;
	&lt;!-- Category Archive End --&gt;

&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<p>The template above will make sure to display the page name you set up, and also, any additional content you might want to add <em>before the archive</em>, from you WordPress page editor. We will be adding our &#8216;latest posts by category&#8217; code between the &#8216;Category Archive Start&#8217; and &#8216;Category Archive End&#8217; comments.<span id="more-1047"></span></p>
<h3>Adding the archive&#8217;s PHP code</h3>
<p>Simply put, the code below will cycle through the first-level categories of your blog (parent categories), check for the ones that are not empty and if this condition is met, return an unordered list of the latest 5 post from each category. Empty categories will not be displayed.</p>
<pre class="brush: php">
&lt;?php
/*
Template Name: Category Archive
*/
?&gt;

&lt;?php get_header(); ?&gt;

&lt;div id=&quot;content&quot; class=&quot;narrowcolumn&quot;&gt;

	&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;
	&lt;div class=&quot;post&quot; id=&quot;post-&lt;?php the_ID(); ?&gt;&quot;&gt;
	&lt;h2&gt;&lt;?php the_title(); ?&gt;&lt;/h2&gt;
		&lt;div class=&quot;entry&quot;&gt;
			&lt;?php the_content(&#039;&lt;p class=&quot;serif&quot;&gt;Read the rest of this page &amp;raquo;&lt;/p&gt;&#039;); ?&gt;

			&lt;?php wp_link_pages(array(&#039;before&#039; =&gt; &#039;&lt;p&gt;&lt;strong&gt;Pages:&lt;/strong&gt; &#039;, &#039;after&#039; =&gt; &#039;&lt;/p&gt;&#039;, &#039;next_or_number&#039; =&gt; &#039;number&#039;)); ?&gt;

		&lt;/div&gt;
	&lt;/div&gt;
	&lt;?php endwhile; endif; ?&gt;

	&lt;!-- Category Archive Start --&gt;
	&lt;ul class=&quot;catArchive&quot;&gt;
	&lt;?php
	$catQuery = $wpdb-&gt;get_results(&quot;SELECT * FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id ) WHERE wtaxonomy.taxonomy = &#039;category&#039; AND wtaxonomy.parent = 0 AND wtaxonomy.count &gt; 0&quot;);

	$catCounter = 0;

	foreach ($catQuery as $category) {

		$catCounter++;

		$catStyle = &#039;&#039;;
		if (is_int($catCounter / 2)) $catStyle = &#039; class=&quot;catAlt&quot;&#039;;

		$catLink = get_category_link($category-&gt;term_id);

		echo &#039;&lt;li&#039;.$catStyle.&#039;&gt;&lt;h3&gt;&lt;a href=&quot;&#039;.$catLink.&#039;&quot; title=&quot;&#039;.$category-&gt;name.&#039;&quot;&gt;&#039;.$category-&gt;name.&#039;&lt;/a&gt;&lt;/h3&gt;&#039;;
			echo &#039;&lt;ul&gt;&#039;;

			query_posts(&#039;cat=&#039;.$category-&gt;term_id.&#039;&amp;showposts=5&#039;);?&gt;

			&lt;?php while (have_posts()) : the_post(); ?&gt;
				&lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;?php endwhile; ?&gt;

				&lt;li&gt;&lt;a href=&quot;&lt;?php echo $catLink; ?&gt;&quot; title=&quot;&lt;?php echo $category-&gt;name; ?&gt;&quot;&gt;More &lt;strong&gt;&lt;?php echo $category-&gt;name; ?&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
			&lt;/ul&gt;
		&lt;/li&gt;
		&lt;?php }	?&gt;
	&lt;/ul&gt;
	&lt;!-- Category Archive End --&gt;

&lt;/div&gt;

&lt;?php get_sidebar(); ?&gt;

&lt;?php get_footer(); ?&gt;
</pre>
<p>You should now save your file, because <strong>we&#8217;re done editing it</strong>. As you can see, the archive code has been added between the &#8216;Start&#8217; and &#8216;End&#8217; comments. Now let&#8217;s go through the code and dissect it.</p>
<h3>The PHP code explained</h3>
<p>The first thing we do is to set up a database query to cycle through the non-empty parent categories:</p>
<pre class="brush: php">
$catQuery = $wpdb-&gt;get_results(&quot;SELECT * FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id ) WHERE wtaxonomy.taxonomy = &#039;category&#039; AND wtaxonomy.parent = 0 AND wtaxonomy.count &gt; 0&quot;);
</pre>
<p>You can further tweak this query to exclude categories or specify categories to be listed based on their ID, with the use of the MySQL comparison functions NOT IN or IN.</p>
<p>Let&#8217;s say that you&#8217;d like the archive to exclude the categories with IDs 2, 5 and 6. Your query would become:</p>
<pre class="brush: php">
$catQuery = $wpdb-&gt;get_results(&quot;SELECT * FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id ) WHERE wtaxonomy.taxonomy = &#039;category&#039; AND wtaxonomy.parent = 0 AND wtaxonomy.count &gt; 0 AND wterms.term_id NOT IN (2,5,6)&quot;);
</pre>
<p>Similarly, if you want to display only the categories with IDs 2,5 and 6, you&#8217;d have:</p>
<pre class="brush: php">
$catQuery = $wpdb-&gt;get_results(&quot;SELECT * FROM $wpdb-&gt;terms AS wterms INNER JOIN $wpdb-&gt;term_taxonomy AS wtaxonomy ON ( wterms.term_id = wtaxonomy.term_id ) WHERE wtaxonomy.taxonomy = &#039;category&#039; AND wtaxonomy.parent = 0 AND wtaxonomy.count &gt; 0 AND wterms.term_id IN (2,5,6)&quot;);
</pre>
<p>For further help with comparison operators and functions, you can check out the <a href="http://dev.mysql.com/doc/refman/5.1/en/comparison-operators.html" target="_blank" title="MySQL Comparison Operators and Functions">MySQL manual</a>.</p>
<p>Next, we set up a category counter which will be incremented each time a category will be displayed. Based on this counter, the code adds a &#8216;<strong>catAlt</strong>&#8216; class that you can use to style differently consecutive categories. In our case, we&#8217;ll use it to shift the categories into two columns. This is were the alternate classes are assigned:</p>
<pre class="brush: php">
$catCounter++;

$catStyle = &#039;&#039;;
if (is_int($catCounter / 2)) $catStyle = &#039; class=&quot;catAlt&quot;&#039;;
</pre>
<p>The category list is built by the use of <strong>foreach</strong> and it helps retrieve vital information about the categories, such as name and permalink:</p>
<pre class="brush: php">
foreach ($catQuery as $category) {
	/* Code used to retrieve and display the latest posts */
}
</pre>
<p>After we display the category title and link through this line of code</p>
<pre class="brush: php">
echo &#039;&lt;li&#039;.$catStyle.&#039;&gt;&lt;h3&gt;&lt;a href=&quot;&#039;.get_category_link($category-&gt;term_id).&#039;&quot; title=&quot;&#039;.$category-&gt;name.&#039;&quot;&gt;&#039;.$category-&gt;name.&#039;&lt;/a&gt;&lt;/h3&gt;&#039;;
</pre>
<p>we continue by using a custom query to retrieve the latest 5 posts from the current category in the cycle, followed by a link to the complete category archive:</p>
<pre class="brush: php">
query_posts(&#039;cat=&#039;.$category-&gt;term_id.&#039;&amp;showposts=5&#039;);?&gt;

&lt;?php while (have_posts()) : the_post(); ?&gt;
	&lt;li&gt;&lt;a href=&quot;&lt;?php the_permalink() ?&gt;&quot; rel=&quot;bookmark&quot; title=&quot;&lt;?php the_title(); ?&gt;&quot;&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;
&lt;?php endwhile; ?&gt;
	&lt;li&gt;&lt;a href=&quot;&lt;?php echo $catLink; ?&gt;&quot; title=&quot;&lt;?php echo $category-&gt;name; ?&gt;&quot;&gt;More &lt;strong&gt;&lt;?php echo $category-&gt;name; ?&gt;&lt;/strong&gt;&lt;/a&gt;&lt;/li&gt;
</pre>
<p>And that&#8217;s about everything in terms of coding! Now, onto the CSS styling.</p>
<h3>Styling the archive</h3>
<p>Find the <strong>style.css</strong> file in your default theme&#8217;s directory, open it and scroll down to the end of the file. Now copy the code below and paste it in your file.</p>
<pre class="brush: css">
/* Latest posts by category styles */

.catArchive {
	width: 450px;
	overflow: hidden;
	margin: 20px 0 0 0;
	padding: 0;
	list-style-type: none;
}

.catArchive h3 {
	font: normal bold 18px sans-serif;
	border-bottom: 1px solid #666;
	margin: 0;
	padding: 0 0 3px 0;
	display: block;
}

.catArchive li {
	display: block;
	float: left;
	width: 210px;
	margin: 0 30px 30px 0;
}

.catArchive ul {
	margin: 0;
	padding: 0;
}

.catArchive li li {
	border-bottom: 1px solid #ddd;
	margin: 0;
	padding: 4px 0;
}

.catAlt {
	margin-right: 0 !important;
}
</pre>
<p>Now, save the file. We&#8217;re done!</p>
<p><strong>Note:</strong> Keep in mind that column sizes have been calculated based on the available space (450 pixels) in the default theme&#8217;s content area. So, our columns should each be 210 pixels wide, with a 30 pixels spacing between them.</p>
<p>Since the column shifting is done with the help of <strong>float</strong>, I&#8217;ve set the overflow to hidden to stretch the list full height. This can only work with a fixed given container width, which in our case is 450px set on <strong>.catArchive</strong>.</p>
<p>If your new to &#8220;floating&#8221;, Sarah has posted a fairly easy to understand article about <a href="http://www.bloggingtips.com/2009/02/12/understanding-the-float-property/" target="_blank" title="The CSS float property">the float property</a> on BloggingTips.com.</p>
<p>You can download an archive containing both source files: <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=4" title="Download Latest Posts by Category source files"><strong>Download</strong></a>.</p>
<hr /><h3>Free PDF eBook: Corporate Blogging Guide by Blogsessive</h3>As a subscribe reader of Blogsessive, this is my gift to you: a guide to corporate blogging (but not only) that will help you in your blogging adventures! <a href="http://blogsessive.com/wp-content/plugins/download-monitor/download.php?id=8" target="_blank">Download now, for FREE!</a><br /><br /><hr/><div style="background: #eeeeee;">Advertise on Blogsessive! <a href="http://buysellads.com/buy/detail/310/" title="Advertise on Blogsessive">125x125 banners</a> for <strong>$50 per month</strong>!</div>&copy;2008-2010 Copyright by <a href="http://blogsessive.com" title="Blogging tips">Blogsessive - Blogging Tips</a>. This Feed is for personal non-commercial use only. If you are not reading this material in your news aggregator, the site you are looking at is guilty of copyright infringement. Please <a href="http://blogsessive.com/contact" title="Contact Blogsessive">contact us</a>, so that we can take legal action immediately.<img src="http://blogsessive.com/?ak_action=api_record_view&id=1047&type=feed" alt="" />]]></content:encoded>
			<wfw:commentRss>http://blogsessive.com/blogging-tools/latest-posts-by-category-archive/feed/</wfw:commentRss>
		<slash:comments>53</slash:comments>
		</item>
	</channel>
</rss>

