Title: Remove current post from grid view
Last modified: August 19, 2016

---

# Remove current post from grid view

 *  Resolved [NoNameAsCannotDeleteSoddingAccount](https://wordpress.org/support/users/yellowfields/)
 * (@yellowfields)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/remove-current-post-from-grid-view/)
 * am developing my site with this cool theme. So far so good, but there is only
   one thing i wish it did. When in single page view, not to show the same post ‘
   preview’ underneath.
 * I can hack around CSS and a little PHP, but I’m sure there must be a ready fix
   for this. Any suggestions?

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

 *  [cheyenneweavergmailcom](https://wordpress.org/support/users/cheyenneweavergmailcom/)
 * (@cheyenneweavergmailcom)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/remove-current-post-from-grid-view/#post-1561326)
 * I’d very much like to know the same thing! Thanks in advance 🙂
 *  [Chinmoy](https://wordpress.org/support/users/chinmoy/)
 * (@chinmoy)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/remove-current-post-from-grid-view/#post-1561332)
 * Use offset. Like
 *     ```
       <?php
         $m_query = new WP_Query('offset=1');
         .....
       ?>
       ```
   
 *  [loligopress](https://wordpress.org/support/users/loligopress/)
 * (@loligopress)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/remove-current-post-from-grid-view/#post-1561410)
 * Where abouts would you put this code?
 *  Thread Starter [NoNameAsCannotDeleteSoddingAccount](https://wordpress.org/support/users/yellowfields/)
 * (@yellowfields)
 * [15 years, 11 months ago](https://wordpress.org/support/topic/remove-current-post-from-grid-view/#post-1561526)
 * Thanks, loligopress. I had come across that, but cannot see how to implement 
   it in this theme. I think the bit of code below is where it should go… somehow.
   Any suggestions? My [site](http://www.yellowfields.co.uk). Thanks.
 *     ```
       <?php /* make a new query for grid items (in single page) */
       	$new_query_arg = 'paged='.$paged;
   
       	// use this code if you want filter items by category.
       	$arr_catID = array();
       	foreach( get_the_category() as $cat) $arr_catID[] = $cat->cat_ID;
       	if ( count($arr_catID) ) $new_query_arg .= '&cat=' . join(',', $arr_catID);
   
       	query_posts($new_query_arg);
       ?>
       ```
   
 *  Thread Starter [NoNameAsCannotDeleteSoddingAccount](https://wordpress.org/support/users/yellowfields/)
 * (@yellowfields)
 * [15 years, 8 months ago](https://wordpress.org/support/topic/remove-current-post-from-grid-view/#post-1561615)
 * Finally made this work, so thought you might be interested in how.
 * Find the following code in index.php, then change the ‘query_posts’ to as shown
   below. This will remove the duplicate entry in the grid view. This will not work
   for ‘sticky’ posts.
 *     ```
       <?php /* make a new query for grid items (in single page) */
       	$new_query_arg = 'paged='.$paged;
   
       	// use this code if you want filter items by category.
       	/* $arr_catID = array();
       	foreach( get_the_category() as $cat) $arr_catID[] = $cat->cat_ID;
       	if ( count($arr_catID) ) $new_query_arg .= '&cat=' . join(',', $arr_catID);
       	*/
   
       	query_posts('offset=1',$new_query_arg);
       ?>
       ```
   
 * The penny finally dropped!!!

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

The topic ‘Remove current post from grid view’ is closed to new replies.

 * 5 replies
 * 4 participants
 * Last reply from: [NoNameAsCannotDeleteSoddingAccount](https://wordpress.org/support/users/yellowfields/)
 * Last activity: [15 years, 8 months ago](https://wordpress.org/support/topic/remove-current-post-from-grid-view/#post-1561615)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
