I’m working on a custom theme for my site and have set up 2 custom single.php templates. In both of the templates I’m using <?php query_posts(‘cat=ID’); ?> where ID is either the only category that I want or the category that I want to exclude.
It’s working on the homepage, but the single.php template now just shows all the posts that match that criteria. Is there a way to do this?
Ok, I think I’ve figured out most of it. What I’m basically trying to do is have one section of my site have only posts from one category and the rest of the categories in another section. I used the ‘Unique Single Template” hack from this page (http://www.webdesignerwall.com/tutorials/wordpress-theme-hacks) to split off the two sections.
Category ID 3 is the one I want on it’s own and I have it working now by changing the default previous_post_link to the following <?php previous_post_link(<strong>Previous Entry</strong>%link', '%title', TRUE, ''); ?>.
However, in the catch all template I have replaced the previous_post_link with <?php previous_post_link('<strong>Previous Article</strong>%link', '%title', FALSE, '3'); ?> but it’s not working and still linking to posts in category 3.