Title: Problem with php query posts URGENT!!!
Last modified: August 20, 2016

---

# Problem with php query posts URGENT!!!

 *  [adriancockings](https://wordpress.org/support/users/adriancockings/)
 * (@adriancockings)
 * [14 years ago](https://wordpress.org/support/topic/problem-with-php-query-posts/)
 * i am just about to launch my new website, and would like to hide all of my blog
   posts from the homepage, i am currently using
    <?php query_posts(‘cat=-1’); ?
   >
 * but when i do, the page navigation (previous, next) wont work, every time i click
   on it, it shows the exact same page, (same posts show)
 * so to sum up i need a new code to replace
    <?php query_posts(‘cat=-1’); ?>
 * and replace it with a code that will remove the blog posts and will still let
   the page nav work!!!
 * Thanks in advanced
    Adrian

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years ago](https://wordpress.org/support/topic/problem-with-php-query-posts/#post-2783783)
 * try:
 * `<?php global $query_string; query_posts( $query_string .'&cat=-1' ); ?>`
 * [http://codex.wordpress.org/Function_Reference/query_posts#Preserving_Existing_Query_Parameters](http://codex.wordpress.org/Function_Reference/query_posts#Preserving_Existing_Query_Parameters)
 *  Thread Starter [adriancockings](https://wordpress.org/support/users/adriancockings/)
 * (@adriancockings)
 * [14 years ago](https://wordpress.org/support/topic/problem-with-php-query-posts/#post-2783787)
 * worked great!!! thank you so much!!
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [14 years ago](https://wordpress.org/support/topic/problem-with-php-query-posts/#post-2783791)
 * please mark the topic as ‘resolved’ if that fixed the problem – thanks.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Problem with php query posts URGENT!!!’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [codeing](https://wordpress.org/support/topic-tag/codeing/)
 * [hide](https://wordpress.org/support/topic-tag/hide/)
 * [homepage](https://wordpress.org/support/topic-tag/homepage/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 3 replies
 * 2 participants
 * Last reply from: [Michael](https://wordpress.org/support/users/alchymyth/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/problem-with-php-query-posts/#post-2783791)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
