Unable to exclude certain categories from the loop (2 posts)

  1. dusselull
    Posted 3 years ago #

    I have been searching through the codex multiple times to get this right. Now I have to ask.
    I am running a website with a blog and a online store. I am using eshop-plugin for my store. My main problem is to filter out the four categories I have used for the store from the main loop. I do not want it to show at the page "nyheter" with my other posts, but only at a different page created for the store.
    I have tried this but it does´nt work:
    ´<?php query_posts($query_string . '&cat=-27,-29,-30,-26'); ?>
    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>´

    In addition to that I want to style these posts differently from the others, specially the thumbnails.

    website: http://myprofil.no

    I really hope someone can help me cause I am totally stuck on these things! Thank you in advance!!

  2. dusselull
    Posted 3 years ago #

    After reading multiple forum sites I found the answer for how i can style one of the categories differently, http://elliotjaystocks.com/blog/tutorial-multiple-singlephp-templates-in-wordpress/

    But I still have not figuered out why I can´t filter out that same category from the loop.

Topic Closed

This topic has been closed to new replies.

About this Topic