I edited my wordpress page to simply display posts from certain groups. This works, but when I wish to view previous records it simply shows exactly the same.
This is actually the blog: http://www.medusaphotography.be/blog/
This is actually the 'previous entries' page: http://www.medusaphotography.be/blog/?paged=2
As you can tell, the posts are the identical.
This really is my code:
... <?php query_posts('cat=-1');?> <?php if (have_posts()) : ?> <?php while (have_posts() ) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> ...
It is simply a fundamental Wordpress loop with query_posts('cat=-1') before it. Basically remove this line, the prior records work, but clearly the posts of category 1 get displayed.
What shall we be held doing wrong?
Right now your query publish overwrites the present query, and merely removes category 1. You want to capture the initial query and modify it.
The next code is going to do the task:
global $query_string; query_posts( $query_string . '&cat=-1' );
Query string holds whatever variables would of past due for that page / publish / category you are well on. You can observe what it really consists of by utilizing print_r()