Exclude one of the blog categories to another page
-
Hi,
I have a blog on my website, it consists of a few categories. I’d like one of the categories to be excluded to another page. I want to have posts from this category displayed in a separate place (and only there).
I tried with writing such a line to the theme file:
<?php query_posts( 'cat=ID' ); ?>
Wrote it in page.php (this file is responsible for the page I’d like to have category posts on) right after this line
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
and yes, I see posts from this category, but they are oddly looped dozens of times, one inside another.
I have now two posts in this category and for this moment there is only newer of them displayed and looped inside itself.Could anyone please tell me how to do it correctly?
- The topic ‘Exclude one of the blog categories to another page’ is closed to new replies.