Skip Navigation

[Resolved] Taxonomy archive for multiple post types

This thread is resolved. Here is a description of the problem and solution.

Problem:

How to sort WordPress Archive results by post type.

Solution:

The Toolset WordPress Archive can not group the results by post types.

In your case, you will need to create three post views, each one query one post type, and filter by:

Select posts with taxonomy:
Tags the same as the current archive page

Then insert above three post views shortcode into the Toolset WordPress Archive.

If you are using Blocks Editor to setup the WordPress Archive, you need to put those three post views outside the "WordPress Archive Loop" block

Relevant Documentation:

This support ticket is created 4 years 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

This topic contains 5 replies, has 3 voices.

Last updated by yulyaB 4 years ago.

Assisted by: Luo Yang.

Author
Posts
#1835453

I'm trying to do Taxonomy archive template (with blocks) "Tags" for multiple post types Posts, Reviews, Webinars and other.
How to display posts first, then webinars, then reviews on one page, so that each post type is in a separate view.
Now they are all in order of publication date, no sorting.

#1835569

Nigel
Supporter

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

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

You are using the legacy editor for custom archives, would that be right?

You can see in the screenshot I have a custom archive for tags that includes multiple post types in the results, and in the order option I can specify the post type for ordering by.

That will group the results according to post type, but it doesn't allow for providing any kind of heading or divider between the different types of post, for example.

If you required that the you would need to add separate Views for each post type to output in place of the archive results.

#1835619

Sorry, I not see screenshot. I'm using Block Editor for wordpress Archive page.

#1836209

Nigel
Supporter

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

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

Screenshot 2020-11-06 at 08.05.26.png

Sorry, I omitted the screenshot, I'm attaching it now.

It's from the legacy editor, where you can specify the post types to be included.

Unfortunately the same option isn't available when using the Block editor. It will get added, but isn't available yet.

There is a workaround, however.

Create the custom archive with the legacy editor and set the content options to include the post types you require, if you then choose to switch to the Block editor for the archive it will remember the post types you had previously selected, even though you cannot see or change that option.

#1836327

Hello,

The Toolset WordPress Archive can only format/style the results, it can not group the results by post types.

In your case, you will need to create three post views, each one query one post type, and filter by:
Select posts with taxonomy:
Tags the same as the current archive page

Then insert above three post views shortcode into the Toolset WordPress Archive.

If you are using Blocks Editor to setup the WordPress Archive, you need to put those three post views outside the "WordPress Archive Loop" block

#1836535

My issue is resolved now. Thank you!