Exclude one category from category archive
-
Hi,
i’m working on a site for a client of mine that sells High end audio equipment. The site is setup so that each item can have categories added to them.
The problem is that there is a category ‘sold’ that should only be shown on the sold page. Not on any other category page. Example when the user clicks on the ‘Amplifier’ category it should show all amplifiers except the sold ones. ‘Sold’ is also a category which can be added to an item.
I’ve tried to exclude the category with a query post:
<?php query_posts(‘cat=-14’);?>
The problem is that this will return all items, not just the amplifiers. I don’t know houw to alter the loop and so that when you click the ‘amplifier’ link in navigation it will show the amplifiers minus the sold ones.
Any help is very much appreciated because i’m going bonkers over this.
- The topic ‘Exclude one category from category archive’ is closed to new replies.