[Resolved] Displaying articles on a web page matching a 1 category
Hi I am running a website and we added a blog for news, events as well as for a few article that we write.
On our website we have a event page, past events, news and past news. I have created match categories on my blog.
On the web page I using this code to display matching articles
<?php query_posts($query_string . '&cat=-1,-2,-3,-4,-5'); ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
However if an article is listed in more than one category the above code does not work if I want to display articles in category 6 but they also listed in category 2 for example.
Is there anyway around this please?
- The topic ‘[Resolved] Displaying articles on a web page matching a 1 category’ is closed to new replies.