• 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 to see the link]

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    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.