Site logo

Archived topic

Content in Archive duplicates with each new single post item

7 replies · Started by Giannis on October 24, 2022

Viewing posts 1–8 of 8

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.

Hi 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?

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 (

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/

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/wJ4PKTk

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.

Updated, converted to loop and magically fixed. You're the WP yoda. Officially.

You're welcome Giannis!

This archived topic is closed to new replies.