Sauter la navigation

[Résolu] Blocks – Content template – How to display multiples parents

This support ticket is created Il y a 5 années. 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10: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/Kolkata (GMT+05:30)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par Franck Il y a 5 années.

Assisté par: Minesh.

Auteur
Publications
#1417985

Hi,

I am creating a site for a company having partners and different products per partner.

I use Blocks.
I created a relationship 1 Partner X n Products

I created a template for Products
There is only one possible Partner for a particular Product
I used a Single Field
Field Source = Standard field
Post source = Parent in the relation
Post Field = Post Title with a link
And everything works fine.

I created a template for Partners
There are many possible Products for a Partner
I don't find what to use to display, for instance, the "Post Title with a Link" list of all the Products associated with this Partner.

#1418083

Minesh
Supporter

Les langues: Anglais (English )

Fuseau horaire: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

As I understand, you want to display the many products that belong to your single partner on a single partner page. If this is correct then :
- you need to add a view block to your template and set its "content selection" to your desired post type, in your case this will be the product post type
- Add whatever you want to display to your view block's "view loop" section
- now to filter the posts belongs to your parnter, Click on the view block and on the right bar you will see the "Query Filter" section and add the query filter for "post relationship or repeatable fields group owner" and select your relationship and further select the option 'The post where this View is shown' and save your view.

Please check the following screenshot:
=> lien caché

By following the above steps I hope you will be able to display the products belongs to your single partner.

#1418185

Not so easy to think to go back to the view.
Very good answer!
Thank you Minesh! 🙂