Title: Query posts from category issue
Last modified: August 19, 2016

---

# Query posts from category issue

 *  [okasu](https://wordpress.org/support/users/okasu/)
 * (@okasu)
 * [15 years, 1 month ago](https://wordpress.org/support/topic/query-posts-from-category-issue/)
 * Hey guys,
 * I have a problem in which I’m trying to queue posts from a specific category 
   with this code:
 *     ```
       <?php foreach(get_the_category($post->ID) as $category) {
       $cat = $category->cat_ID; }
       query_posts('orderby=menu_order&cat=' . $cat . '&order=ASC&offset=1'); ?>
       ```
   
 * It’s listing all of the posts but it’s not in relationship to the page you’re
   currently on. I would like for the current page you’re on within that category
   to not show up on that list but at the same time still show the other posts from
   that category in normal order.
 * I’ve been trying to figure this out forever but I just can’t seem to land it.
 * Can anyone please lend a hand?
 * Dave

The topic ‘Query posts from category issue’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 0 replies
 * 1 participant
 * Last reply from: [okasu](https://wordpress.org/support/users/okasu/)
 * Last activity: [15 years, 1 month ago](https://wordpress.org/support/topic/query-posts-from-category-issue/)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
