Title: Category offset and widgets
Last modified: August 10, 2018

---

# Category offset and widgets

 *  [controlyourcoin](https://wordpress.org/support/users/controlyourcoin/)
 * (@controlyourcoin)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/category-offset-and-widgets/)
 * Hey there,
 * After some searching figured out how i can put an offset on a category page.
   
   But this brings me an other problem, the widget are also affected by the code.
 * I want on my category page with on top a widget with the first 2 or 3 articles
   followed by the normal category list. But now when i add the widget you see double
   articles.
 * How can i change the offset so my widgets wont be affected?
    on the link you 
   can see what i mean. _[ redundant link removed ]_
 * Thank you so far!
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcategory-offset-and-widgets%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Moderator [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * (@bcworkz)
 * [7 years, 9 months ago](https://wordpress.org/support/topic/category-offset-and-widgets/#post-10583911)
 * It sounds like you are using a hook of some sort to alter the query. pre_get_posts?
   You need to conditionally apply your change only to the main category query and
   not widget queries. There will be something unique in the query allowing your
   code to tell the difference.
 * In any case, you apparently solved this? I don’t see any double articles on the
   page you linked.

Viewing 1 replies (of 1 total)

The topic ‘Category offset and widgets’ is closed to new replies.

## Tags

 * [category](https://wordpress.org/support/topic-tag/category/)
 * [offset](https://wordpress.org/support/topic-tag/offset/)
 * [widget](https://wordpress.org/support/topic-tag/widget/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [bcworkz](https://wordpress.org/support/users/bcworkz/)
 * Last activity: [7 years, 9 months ago](https://wordpress.org/support/topic/category-offset-and-widgets/#post-10583911)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
