Skip Navigation

[Resolved] Content Templates for single Taxonomy Archive terms returning multiple items

This support ticket is created 4 years, 9 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Our next available supporter will start replying to tickets in about 4.33 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 2 replies, has 2 voices.

Last updated by Gavin 4 years, 9 months ago.

Assisted by: Nigel.

Author
Posts
#1500271

I created a Content Template for a Taxonomy Archive using the Block Editor

When displaying a taxonomy with no children (i.e. a taxonomy term), multiple instances of the term are listed in the front end.

e.g. where the URL is ../taxonomy/taxonomy-term/

The Content Template itself displays correctly but with multiple instances of the same template. It looks like it is displaying a copy for every parent taxonomy.

This happens with any theme I tested it with.

Note: To get around this I removed the loop from the php template and just used post() and content() to display the content. As I understand it, if only one item exists, only one item should be displayed?

#1501295

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Gavin

Reading through this I'm not quite sure of the steps to test.

"I created a Content Template for a Taxonomy Archive using the Block Editor".

You didn't create a custom archive at Toolset > WordPress Archives, you created a Content Template and assigned it to the taxonomy archive, so effectively you are designing the template for the individual posts that are output by the archive, correct?

"When displaying a taxonomy with no children (i.e. a taxonomy term)"...

You mean this is a hierarchical taxonomy and you are displaying a top-level term that has no child terms, yes? And, so, the behaviour is different for top-level terms that do have children?

"...multiple instances of the term are listed in the front end."

A Content Template assigned to a taxonomy archive doesn't output terms, it outputs posts. What do you mean?

I don't quite understand the problem you are describing.

An annotated screenshot of the output would probably help.

#1501305

hehe - thanks Nigel. It's probably me being daft then! Yes. It displayed posts... My bad... I'm moving my personal beatboxing site from using Layouts to using the block editor and content templates. Previously, I could set up a layout to display an individual category term with term custom fields... so I assumed the content template for archives did the same... but of course it's post archives... I need more sleep. Thank you.