Skip Navigation

[Résolu] Related posts view from same category

Ce fil est résolu. Voici une description du problème et la solution proposée.

Problem:
How to create a View that displays Posts of the same Taxonomy?

Solution:
You can do that with one View.
The View should query Posts, and have a Query Filter like this:

Select posts with taxonomy:
Categories the same as the page where this View is shown

This will then automatically show Posts belonging to the same Taxonomy term as the current Viewed Post.

The view needs to be inserted in the Post or it's content template.

Relevant Documentation:
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/

This support ticket is created Il y a 7 années et 1 mois. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

This topic contains 4 réponses, has 2 voix.

Last updated by hugoC-3 Il y a 7 années et 1 mois.

Assisted by: Beda.

Auteur
Publications
#495672

I am trying to set up a related posts view with posts from the same category:

If the post belongs to category A, then other posts from category A are shown.
If the post belongs to category B, then other posts from category B are shown.

How can I do that?

#495913

You can do that with one View that you insert to a Content Template, which then is assigned to all your Posts.

The View should query Posts, and have a Query Filter like this:

Select posts with taxonomy:
Categories the same as the page where this View is shown

This will then automatically show Posts belonging to the same Taxonomy term as the current Viewed Post.
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/

#496698
Schermafdruk 2017-03-03 10.40.37.png

I tried to set up a taxonomy view (see screenshot). But when I apply this, either as a part of an content template or inside an after entry widget, all I get is a couple of duplicates of the current post instead of the other posts is the category.
So I need some further assistance!

#497066

I did not mention to create a Taxonomy View.
Instead, you should create a View that queries Posts.

This is what you want to display, therefore it must be queried.
It's elaborated here:
https://toolset.com/documentation/user-guides/filtering-views-by-taxonomy/

#498015

Thanks. I should have read the documentation more carefully!

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.