-
swissky
Hey, i working at the moment on a News Page and we use a query loop to display the part you see on the private note. That works good on a single page, but if i create an element for the categories, it doens`t shows up.
I add the part to an existing element for a other query loop on a category and created a new one as a Heading insted the Loop.
Any idea?
-
David
Hi there,
what Elements are you using for the category archive ?
As you ideally want to use a Block Element – Loop Template:
https://docs.generatepress.com/article/block-element-loop-template/
And then the Query Loop should have its parameter set to
Inherit Query from Template
selected. This will make it dynamically load whatever posts for the relevant category -
swissky
I added a video for the overview. It should setup right.
-
In a block element – loop template, it’s supposed to be only one query loop which is
Inherit Query from Template
, as the loop will show the default posts of that archive.You have multiple query loops and all of them have the
Inherit Query from Template
, there’s even a query loop inside another query loop, which might create an infinite loop issue.So no, you are not setting up it correctly.
To show specific posts in the loop template’s hero section, you might need to create a block element – page hero per category, and set the query loop with specific posts, meaning the option
Inherit Query from Template
should not be enabled.
- You must be logged in to reply to this topic.