Passer la navigation

[Résolu] Display content from post relationship using custom field and custom taxonomy

This support ticket is created Il y a 2 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.

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 -

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

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

Dernière mise à jour par dbarber Il y a 2 années et 1 mois.

Assisté par: Minesh.

Auteur
Publications
#2616039

Minesh
Supporter

Les langues: Anglais (English )

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

I've created the following view and the following view is set to query post type "Award Programs" to get related award program post:
=> lien caché

And to above view I've added the following "Query Filters:

Filter by post relationship or repeatable fields group owner:
Select posts in a Annual Awards relationship that are related to the Post where this View is shown.

Taxonomy filter:
Select posts with taxonomy:
Award Categories in one of these: Chapter of the Year
AND
Years the same as the page where this View is shown

Where:
- We added the taxonomy filter for taxonomy "Award Categories" to get post where term "Chapter of the Year" is assigned
- We added the taxonomy filter for taxonomy "Years " to get post where term "2023" is assigned so it will be as same where view is shown

Now, with the above view's loop editor, I've added another view:
=> lien caché

 [wpv-view name="annual-awards-chapter-profiles" chaptertype="[wpv-attribute name='chaptertype']"]

With the above view's loop editor I've added the chapter title you want to display:

<li> [wpv-post-link item="@award-profile.child"] </li>

Where:
- You are welcome to add any fields that you want to display with above loop editor.

Later in the content tempalte where you added all categories like Small, Large etc..etc:
=> lien caché

I've added the newly created view as given under:

[wpv-view name="get-award-program-id" chaptertype="Small"] 

[wpv-view name="get-award-program-id" chaptertype="Medium"]

[wpv-view name="get-award-program-id" chaptertype="Large"]

[wpv-view name="get-award-program-id" chaptertype="International"]

Now if you visit the page I can see the correct results:
=> lien caché

Can you please confirm it works as expected.

#2616295

My issue is resolved now. Thank you!

One thing about the "How easy was it for you to solve the problem" rating:

My rating is based entirely on Minesh making it super easy to solve my problem. If I were answering for myself (as the problem-solver) I would have chosen the opposite end of the scale because I couldn't solve it, which is why I reached out for help (I just want to make sure I understood what you're looking for me to rate).