Title: Query loop issue
Last modified: October 23, 2023

---

# Query loop issue

 *  [spello](https://wordpress.org/support/users/spello/)
 * (@spello)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/)
 * In “query loop” block, after selecting “inherit query from template” query result
   works as if I had selected “offset”. I can’t see 1st post of every query (in 
   search results page or on archives). How can I fix the issue?
    -  This topic was modified 2 years, 7 months ago by [spello](https://wordpress.org/support/users/spello/).

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

 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17145424)
 * Hi [@spello](https://wordpress.org/support/users/spello/), that definitely sounds
   very unusual. There’s a couple of things that would be helpful to know to help
   troubleshoot.
    - Do you have a link to the site where I can check it out as a visitor?
    - Do you have any other plugins active? Does the issue still occur when you 
      have them deactivated?
    - It sounds as though this Query Loop block is in one (or some) of your templates–
      could you please confirm which ones?
 *  Thread Starter [spello](https://wordpress.org/support/users/spello/)
 * (@spello)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17145766)
 * Hello.
   No, I don’t use additional plugins.I use custom template for archives 
   and search pages.I’d be happy to send you a link but would like to do it via 
   PM. How can I do that?
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17148234)
 * Hi [@spello](https://wordpress.org/support/users/spello/) – if you open the the
   template for the archive or search page within the Site Editor (Appearance > 
   Editor) you can then click the button with three dots at top right of the editor–
   and select ‘Copy all Blocks’ from the menu that appears.
 * ![](https://i0.wp.com/snipboard.io/MbuqKH.jpg?ssl=1)
 * Once you’ve done that – you can paste it into a `/code` block within the editor
   in the forums here – and I can check it out.
 *  Thread Starter [spello](https://wordpress.org/support/users/spello/)
 * (@spello)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17149521)
 * Okay. Here is the code for “search” template: [https://pastebin.com/VkbRxner](https://pastebin.com/VkbRxner)
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17151153)
 * Hey [@spello](https://wordpress.org/support/users/spello/) – thanks for that.
   I tried out that template and I can’t seem to recreate the issue.
 * Do you still have that issue occuring if you switch to another theme like TwentyTwentyTwo?
   Or only with this one?
 * The only other thing I can think is if one of the Template Parts/Areas you have(
   which didn’t come through in what you shared) might be impacting in some way.
   You could try that template with those removed to see if it makes a difference.
 *  Thread Starter [spello](https://wordpress.org/support/users/spello/)
 * (@spello)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17151735)
 * Hello. Query from both search and archive templates works properly after removing
   left sidebar template part. Here is its code: [https://pastebin.com/dVbtzPGy](https://pastebin.com/dVbtzPGy)
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17153922)
 * Nice detective work [@spello](https://wordpress.org/support/users/spello/) – 
   we’re definitely narrowing down the issue…
 * I see there’s a few query loops in that sidebar – so the next thing I’d suggest
   is trying out the template with those sidebar query loops removed one by one –
   to narrow it down further.
 *  Thread Starter [spello](https://wordpress.org/support/users/spello/)
 * (@spello)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17155985)
 * It works only if I remove all queries from this sidebar.
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17159528)
 * Hmmm – ok thanks for trying that out. One other question I have – had you dupicated
   any of the Query Loop blocks to then adjust into the new queries? Or were all
   those queries created new?
 *  Thread Starter [spello](https://wordpress.org/support/users/spello/)
 * (@spello)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17159857)
 * Hey. Yes most of these blocks were surely duplicated and then adjusted.
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17162629)
 * > Hey. Yes most of these blocks were surely duplicated and then adjusted.
 * OK – that’s good to know. It’s possible that having those duplicated _could_ 
   be impacting the way they interact. If you edit that sidebar template part and
   then click the three-dots at the top-right to view the HTML version.
 * You’ll see that each Query Loop contains an ID – could you please make sure that
   each of those is different?
 *  Thread Starter [spello](https://wordpress.org/support/users/spello/)
 * (@spello)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17163787)
 * I have changed IDs to be unique on every query block on sidebars but with no 
   effect.
 *  Moderator [jordesign](https://wordpress.org/support/users/jordesign/)
 * (@jordesign)
 * [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17176505)
 * Hey [@spello](https://wordpress.org/support/users/spello/) – thanks for trying
   that out. To be honest – I’m a little unsure beyond that what might be causing
   the issue…
 * One other thing I can think of is if any of the sidebar queries are using ‘inherit
   query from Template’ in case that is conflicting – that could be worth checking.

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

The topic ‘Query loop issue’ is closed to new replies.

 * ![](https://i0.wp.com/themes.svn.wordpress.org/twentytwentythree/1.6/screenshot.
   png)
 * Twenty Twenty-Three
 * [Support Threads](https://wordpress.org/support/theme/twentytwentythree/)
 * [Active Topics](https://wordpress.org/support/theme/twentytwentythree/active/)
 * [Unresolved Topics](https://wordpress.org/support/theme/twentytwentythree/unresolved/)
 * [Reviews](https://wordpress.org/support/theme/twentytwentythree/reviews/)

 * 13 replies
 * 2 participants
 * Last reply from: [jordesign](https://wordpress.org/support/users/jordesign/)
 * Last activity: [2 years, 7 months ago](https://wordpress.org/support/topic/query-loop-issue/#post-17176505)
 * Status: not resolved