Category Posts in WordPress Pages

My weblog goes exactly against common recommendations to choose a narrow niche subject (or one with a lot of scantily clad girls) and stick to it in order to grow readers.  I don’t care about that.  What I care about is archiving my stuff somewhere where others can access it if they want to…if not, no big deal.

My stuff is very eclectic a varies depending on what I am currently thinking about or doing.  I wanted to organize topics into pages for easier access.  I love the Simplr WordPress Theme because it focuses the reader on the content, not on flash.  Simplr puts the categories at the bottom of the page, even though there is a skip content option I would rather have my topics up front.  After a little searching I found the topic resolves on WP forums here:

I combined a couple of the recommendations.  Here’s how I did it [DISCLAIMER:  I know code like I know Spanish…enough to order fajitas and ask for El Baño]

1.  Find index.php in your Simplr theme folder, make a copy of the file (in a pc right click, choose copy, and past back into the folder).  The new file should be index(2).php, open it in a text editor such as Notepad.

2.   Choose Save As… from the file menu and save with the name of the category page template you want to create.  Example:  faith.php

3.  paste this code at the very top of the page and change “Faith” to your template name.

<?php /*
	Template Name: Faith
*/ ?>

4.  Find the following code right below the code you just pasted

<?php get_header()?> 

             <div id="container">
                    <div id="content">
<?php query_posts(‘category_name=projects&showposts=10’); ?>

5.  Paste the following two lines below that code

<?php query_posts('category_name=faith&showposts=10'); ?>

6.  Change “faith” to the exact category slug name listed on your WordPress dashboardPostPic1

7.  Save the file and upload to the Simplr Folder on your server [/wordpress/wp-content/themes/simplr] using the method you normally use to upload files.

8.  Create a new page in your WordPress dashboard (See image below)

9.  Title your page (See image below)

10.  Choose the template you created and uploaded from the Attributes Template drop down menu (See image below)

11.  Publish your page (See image below)

12.  If your page is blank or does not contain any of your category posts, go back and make sure you properly input all of the code and category names.

Good luck.


Leave a Reply

Your email address will not be published. Required fields are marked *

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