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 1 year, 1 month ago by spello.
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?
Hi @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.
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.
Hey @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.
Hello. Query from both search and archive templates works properly after removing left sidebar template part. Here is its code: https://pastebin.com/dVbtzPGy
Nice detective work @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.
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?
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?
Hey @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.