- This topic has 7 replies, 3 voices, and was last updated 5 months, 1 week ago by
Fernando.
-
AuthorPosts
-
October 24, 2022 at 10:46 am #2384545
Giannis
https://jobsgreek.com/language/Finnish/
So this is the page. 2 job posts in this archive = content gets printed twice! It is made with elements and the query loop with Generate Press.
If I have 3 jobs, 3 times content. You get the picture.October 24, 2022 at 12:28 pm #2384605Ying
StaffCustomer SupportHi there,
It looks you are using the content template/query loop in an incorrect way, and this is the normal behavior.
Can you tell me what you want this archive page to look like?
October 24, 2022 at 10:14 pm #2384852Giannis
Mornings!
“How to apply for a Finnish speaking job in Greece?”
This should be the last paragraph. But in reality, after this, it gets repeated. I thought it was the layout of the build but I even placed the query loop totally outside of any other element and I still get this wrong behavior. I think there is a shortcode that resets the query in a way or sth? I used to fix this somehow in the past for another site but now I have totally forgotten the way (October 24, 2022 at 10:26 pm #2384858Fernando Customer Support
Hi Giannis,
It’s repeating because you have a Query Loop Block inside a Content Template.
If you’re using a Block Element – Content Template, you’ll need to design how a single post should look like in the Archive page.
You’ll find good examples here: https://docs.generatepress.com/article/block-element-content-template/
Then, for the “Finnish speaking jobs, what does that even mean?” up to “How to apply for a Finnish speaking job in Greece?” parts, you can add those through a Block Element – Hook. Hook it to
before_footer
for instance.The Alternative would be to update to GP Premium 2.2.0 r.c. and GP 3.2.0 r.c. versions, and use a Block Element – Loop Template where you’ll be able to place Query Loop inside your Block Element Loop. Reference: https://docs.generatepress.com/article/block-element-loop-template/
October 24, 2022 at 10:28 pm #2384859Giannis
I want this Archive to show some fixed content and then a query with this Archive’s singles. And this supposed to be a custom taxonomy archive.
Here is my layout and rules as well:
https://ibb.co/ZBQRHTC
https://ibb.co/wJ4PKTkOctober 24, 2022 at 10:31 pm #2384861Fernando Customer Support
That Layout/Structure won’t work on a Block Element – Content Template on an Archive/Blog Page. You’ll need to structure your Content Template as mentioned above or use a Loop Template instead.
October 24, 2022 at 11:10 pm #2385008Giannis
Updated, converted to loop and magically fixed. You’re the WP yoda. Officially.
October 25, 2022 at 12:40 am #2385050Fernando Customer Support
You’re welcome Giannis!
-
AuthorPosts
- You must be logged in to reply to this topic.