• Resolved Damien15

    (@damien15)


    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?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Displaying articles on a web page matching a 1 category’ is closed to new replies.