trying to exclude some categories (2 posts)

  1. slak
    Posted 3 years ago #

    Hello, i recently purchase a theme, in this theme the loop is:

    <?php  while ($custom_query->have_posts()) : $custom_query->the_post(); ?>

    i tryed to add the exclude code
    <?php query_posts($query_string . '&cat=-15'); ?>

    it simply doesnt works :(
    im so confused i have tried some possible solutions and cant get it

    any idea please?

  2. query_posts is always the wrong way, see http://developer.wordpress.com/2012/05/14/querying-posts-without-query_posts/ for how to do it the right way.

Topic Closed

This topic has been closed to new replies.

About this Topic