pwdiane
Member
Posted 4 months ago #
I have followed the directions I've found in several places in the support forum, but all seem to lead to a dead end for me.
All I want is the necessary code and where to insert it to:
make my category 143 only show on my Tips page.
I have a new page template for Tips page.
I have a category of posts with id=143.
I know how to exclude category 143 from the front page and that is working well.
Isn't there some easy way?
Thanks for your help!
Peter Shilling
Member
Posted 4 months ago #
Do you need to create a page for this.
If you want to show all the posts in the category 'foo' you should be able to go to yourdomainname.com/category/foo
Does that do want you're looking for ?
Peter
[sig moderated as per the Forum Rules]
Easy way more than query_posts? No I don't think so :)
PHPanos
Member
Posted 4 months ago #
Put this before the main loop? query_posts('cat=143');
pwdiane
Member
Posted 4 months ago #
You were MOST helpful, PHPanos! Thank you! I had tried many other harder ways and they all came to a crashing halt for one reason or another.
For anyone else who might want to use this beautiful little line of code, put this just after: <div id="main"> and before: <?php if (have_posts()) : ?>
Don't forget to add the <?php and ?>
<?php query_posts('cat=143'); ?>
Thanks again for your help!
Diane
PHPanos
Member
Posted 4 months ago #
You're welcome :) Mark this post as "Resolved" on the right side :)
pwdiane
Member
Posted 4 months ago #
Sorry I missed that. Thanks again.