<?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>WordPress Hacks &#187; Wordpress Post Titles</title>
	<atom:link href="http://wphacks.com/tag/wordpress-post-titles/feed/" rel="self" type="application/rss+xml" />
	<link>http://wphacks.com</link>
	<description>WordPress Themes, Plugins, Hacks, Tutorials, and more!</description>
	<lastBuildDate>Thu, 02 Feb 2012 15:20:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>How To: Converting Your Category Pages to Display Post Titles</title>
		<link>http://wphacks.com/how-to-converting-your-category-pages-to-display-post-titles/</link>
		<comments>http://wphacks.com/how-to-converting-your-category-pages-to-display-post-titles/#comments</comments>
		<pubDate>Mon, 24 Mar 2008 11:00:11 +0000</pubDate>
		<dc:creator>Kyle Eslick</dc:creator>
				<category><![CDATA[Hacks]]></category>
		<category><![CDATA[WordPress Categories]]></category>
		<category><![CDATA[WordPress Code]]></category>
		<category><![CDATA[WordPress Post Loop]]></category>
		<category><![CDATA[Wordpress Post Titles]]></category>

		<guid isPermaLink="false">http://wphacks.com/how-to-converting-your-category-pages-to-display-post-titles/</guid>
		<description><![CDATA[Many WordPress themes are setup to display their category pages in the same format as your blog&#8217;s homepage, making your categories useless to some. This can cause duplicate content problems, as well as making your categories difficult to avoid. If this isn&#8217;t the case for you, then your theme is probably instead setup to just [...]]]></description>
			<content:encoded><![CDATA[<p>Many <a href="http://wphacks.com/wordpress-themes/">WordPress themes</a> are setup to display their category pages in the same format as your blog&#8217;s homepage, making your categories useless to some.   This can cause duplicate content problems, as well as making your categories difficult to avoid.   If this isn&#8217;t the case for you, then your theme is probably instead setup to just display a post excerpt for each post on your category page.  I&#8217;ve never been a fan of this either, as this format strips your post of links/styles and doesn&#8217;t give you control over how much of the post to display.</p>
<p>Instead, I&#8217;ve always liked the idea of showing only the post titles on your category pages.  If you are good at making post titles, this should help someone navigating your categories to find what they are looking for.</p>
<p>First, you&#8217;ll want to open your archive.php file and find the post loop.  It usually starts with this code (or something similar):<br />
<code><br />
&lt;?php if (have_posts()) : while (have_posts()) : the_post(); ?&gt;</code></p>
<p>You&#8217;ll want to delete everything from that code down to the end of the loop, which usually ends with this:<br />
<code><br />
&lt;?php endif; ?&gt;</code></p>
<p>Now, you&#8217;ll want to replace the post loop code with the following slightly different code loop:</p>
<p><code>&lt;?php $temp_category = single_cat_title('',false); if (!empty($temp_category)){ // give index ?&gt;<br />
&lt;h1&gt;&lt;?php single_cat_title(); ?&gt;&lt;/h1&gt;<br />
&lt;p&gt;&lt;?php echo(category_description(the_category_ID(false))); ?&gt;&lt;/p&gt;<br />
&lt;?php if ($posts) : foreach ($posts as $post) : start_wp(); ?&gt;<br />
&lt;li&gt;&lt;a href="&lt;?php the_permalink() ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt;&lt;/li&gt;&lt;br&gt;<br />
&lt;?php endforeach; else: ?&gt;<br />
&lt;p&gt;&lt;?php _e('Sorry, no posts matched your criteria.'); ?&gt;&lt;/p&gt;<br />
&lt;?php endif; ?&gt;<br />
&lt;?php }else{ // give details or single post ?&gt;<br />
...... code for normal post overview<br />
&lt;?php } ?&gt;</code></p>
<p>And you&#8217;re done!  You can add&lt;li&gt;, &lt;ol&gt;, and whatever else as needed, and then style your archives page in your stylesheet to get the look you&#8217;re trying to achieve.</p>
<img src="http://wphacks.com/?ak_action=api_record_view&id=199&type=feed" alt="" /><p>You are reading <a href="http://wphacks.com/how-to-converting-your-category-pages-to-display-post-titles/">How To: Converting Your Category Pages to Display Post Titles</a>  © 2008 | <a href="http://wphacks.com">WordPress Hacks</a> | <a href="http://wpnexus.com">WordPress Directory</a> | <a href="http://wpforums.com/">WordPress Forums</a> | <a href="http://wpebook.com/">WordPress eBook</a></p>

<p><small>Enjoy writing about WordPress?  Get your blog more exposure by joining the <a href="http://wphacks.com/write/">WordPress Hacks writing team</a>!</small></p>]]></content:encoded>
			<wfw:commentRss>http://wphacks.com/how-to-converting-your-category-pages-to-display-post-titles/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

