Custom loop not working
-
Hi,
I’m having one helluva time customizing a single loop, my index.php loop, to post everything but 2 categories. I’ve read everywhere it should be as simple as putting a simple line of code,
<?php $posts = query_posts($query_string.'&cat=-7&posts_per_page=5'); ?>
, in the case of category “7,” for instance, just before the loop you’re looking to alter. But no deal.Plus I’ve tried every variation I could get my hands on, and nothing is working. Am I not doing something? Like specifying something in the admin area, say? Because I’ve been at this all day, and had various loops do everything, but what I want. Which is to exclude 2 categories, from listing on my front page.
Many thanks, in advance,
Johnny
- The topic ‘Custom loop not working’ is closed to new replies.