-
erickimani
-
David
OK, what Element Type is the Element you’re using ? It it a Content Template ?
-
erickimani
Yes it is. I followd Yings isntructions (see previous thread)
-
You can NOT use query loop block inside the content template, it will cause the posts repeating issue you are having now.
Please watch the video in this article to understand how a content template work:
https://docs.generatepress.com/article/block-element-content-template/ -
erickimani
Hi.
i went through the video and got this setup (used one of the templates even to avoid errors). This is the element settings
https://paste.pics/85d39c2fb78edb500240adfd1cc605aa
These are the reading settings on wordpress
https://paste.pics/340b969d36cc0d04e3731d0f425f87a3
Still this is what I get… Its a list of all the posts.
https://africaminingbrief.com/
What I wanted eventually to have is the most recent post showing for selected categories
as shown here
https://constructionreviewonline.com/
or here
-
What I wanted eventually to have is the most recent post showing for selected categories
In that case, this method doesn’t work, sorry I’ve misunderstood your needs.
You will still need to use a static page with query loop block, you can change the block element – page hero’s location to the static page.
But as I said before, query loop can NOT do infinite scroll, so I don’t see a solution to achieve what you are looking for, unfortunately.
-
erickimani
I wont need the infinite scroll. But I will need to get the setup as shown on the 2 sites I have shown you.
-
In the static page, you can add multiple query loop blocks, and set their
posts per page
to1
.Click the Add parameter button > Taxonomies > categories > select the category you want to show:
https://www.screencast.com/t/U7c8whdDvVESo each query loop shows 1 post from the selected category, is that what you want?
-
erickimani
Thats what I did and it worked.
Thank you
-
Glad to hear that 🙂
- You must be logged in to reply to this topic.