Creating a Wordpress Single Category Page

January 23rd, 2010 § 0

Sometimes you want to make a link to a specific category only on Wordpress. There are a couple ways you can do this:

1) Create a link to the category page

To do this, you can get the category slug and create a url like this: http://my-url.com/category-slug, where category-slug is your category.

2) Use the wordpress built-in category.php template page.  You can get a copy here.

3) You can also do this with a wordpress template page, where you hardcode the category into the page: (Side note: this is a copy/paste/edit of the “Archives” Template page found in the wordpress default Kubrik theme)

  1. <div id="content">
  2. <div id="entry_content">
  3. <div>&gt;
  4. <h2><a title="Permanent Link to &lt;?php the_title_attribute(); ?&gt;" rel="bookmark" href="&lt;?php the_permalink() ?&gt;"></a></h2>
  5. 0', '§ <span class="commentcount">1</span>', '§ <span class="commentcount">%</span>'); ?&gt;
  6. <div class="entry"></div>
  7. </div>
  8. <!– close post_class –>
  9. <div class="navigation"></div>
  10. <div class="entry">
  11.  <span class="error"><img src="&lt;?php bloginfo('template_directory'); ?&gt;/images/mal.png" alt="error duck" /></span>
  12.  
  13. Hmmm, seems like what you were looking for isn't here.  You might want to give it another try - the server might have hiccuped - or maybe you even spelled something wrong (though it's more likely <strong>I</strong> did).</div>
  14. </div>
  15. <!– close entry_content –></div>

Tags: , , , , , , , , , ,

Sphere: Related Content

Tagged: , , , , , , , , , ,

§ Leave a Reply

What's this?

You are currently reading Creating a Wordpress Single Category Page at Reinforce Media, LLC.

meta

FireStats icon Powered by FireStats