Archived topic
Query Loop going crazy
5 replies · Started by Former User on December 29, 2022
Hello,
I am doing a custom layout for the archives page on the URL below and for some reason the query loop has gone crazy and is making the same loop like 20 times. I just want to show it once, how can I do this?
Thanks and Happy Holidays,
Sara
Hi there,
if you're using a Block Element to create the archive page then you must set the Element Type to: Loop Template
https://docs.generatepress.com/article/block-element-loop-template/
Hello David,
Ok I did that and fix that but, there is another problem with query loop, how I tell query loop to show archive page of the current category or tag?
I had tried on Query Loop to "Add a Parameter" choosing List of Terms > Categories > Current Post Terms but, it shows me nothing so, how I am supposed to do this?
Also, how I add pagination?
Thanks!
In the GB Query Loop settings, there is an option: Inherit Query from Template - check that, and it will automatically set the query.
Pagination - in the QL blocks toolbar there is an option to add pagination.
Hello David,
Perfect, that solve the issue, thanks!!
Happy New Year!
Glad to hear that :)
