Skip Navigation

[Resolved] Place Post-Tiltle, Post-Excerpt and Post-Taxonomy of a on-to-many Relation

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

Problem:
Place Post-Tiltle, Post-Excerpt and Post-Taxonomy of a one-to-many Relation

Solution:

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/place-post-tiltle-post-excerpt-and-post-taxonomy-of-a-on-to-many-relation/#post-1227169

Relevant Documentation:
https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/

This support ticket is created 5 years, 8 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.

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)

This topic contains 6 replies, has 2 voices.

Last updated by TorstenR3514 5 years, 8 months ago.

Assisted by: Minesh.

Author
Posts
#1226790
view-settings.png
title-excerpt-taxonomies-of-Artisten-and-not-Shows.png
cant-select-related-views.png

Tell us what you are trying to do?

Http Access for the Link is:
Zirkus:imPark

I have the Post Types Artisten (artists), Shows and Locations. I want to show the related Shows of an Artist which are related by a one (Artisten) to many (Shows) relation. I created a view "list-Shows-of-Artisten" (see views-settings.png).

When I want to place the related Shows post-title, post-excerpt or post-taxonomy i can't select Shows at "Post selction/A post related to the current post, set by a Types relationship/Artisten Shows (one-to-many relationship)/Shwos" like i thoguht it would work. (see cant-select-related-views.png)

The (?) Hint tells me that: "Artisten Shows (one-to-many relationship) To display the Shows that are connected to each Artist, you will need to create a View." But thats waht I'am doing right there or not?

Ont the following link u will find the Shows by an artist genereated (by Toolset) with post-title, post-excerpt and post-taxaonomies of the artist, and not of the related shows like i should be. (see title-excerpt-taxonomies-of-Artisten-and-not-Shows.png)
hidden link
Beneath you will find the handwritten Version like it should be. (by hand, like it should be)

My Views Template:

<div class="lp-shwo-programm">
<div class="lp-show-start"><div class="lp-show-start-tag">[types field='show-start' style='text' format='l'][/types]</div><div class="lp-show-start-datum">[types field="show-start" style='text' format='j.m.Y'][/types]</div><div class="lp-show-start-uhrzeit">[types field='show-start' style='text' format='H:i'][/types]</div></div>
<div class="lp-show-ort"><div class="lp-show-ort-icon"><img src="[types field='location-icon' output='raw' resize='proportional' item='@location-show.parent'][/types]" alt="" height="40" width="40"></div><div class="lp-show-ort-name">[wpv-post-title item="@location-show.parent"]</div></div>
<div class="lp-show-eintrag"><div class="lp-show-titel"><h4>[wpv-post-title item="@artist-show.parent"]</h4></div><div class="lp-show-art">[wpv-post-taxonomy type="auffuhrungs-typ" item="@artist-show.parent"]</div><div class="break"></div><div class="lp-show-excerpt">[wpv-post-excerpt format="noautop" item="@artist-show.parent"]<span class="lp-show-dauer">Dauer: [types field="show-dauer"][/types]</span></div></div>
</div>

The Types that should give out the data from "Shows" and not from "Artisten" are:

[wpv-post-title item="@location-show.parent"]
[wpv-post-taxonomy type="auffuhrungs-typ" item="@artist-show.parent"]
[wpv-post-excerpt format="noautop" item="@artist-show.parent"]

What I wonder is that i can select the related post-title of "Locations" of the show with [wpv-post-title item="@location-show.parent"] and he does it just right.

Is there any documentation that you are following?
Think I'am not rearly getting it ? https://toolset.com/documentation/post-relationships/how-to-display-related-posts-with-toolset/?utm_source=postselector&utm_campaign=m2m&utm_medium=post-selector-documentation-link&utm_term=Documentation#displaying-many-related-items

Is there a similar example that we can see?
See (by hand, like it should be) und (by Toolset) at the link.

What is the link to your site?
hidden link

#1226971

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Well - as I understand, you want to display shows related to artists and location belongs to shows - correct?

As you want to display shows related to artists it will not allow you to select the "shows" but the artist with post relationship options.

I need to review your relationship structure and how you added it to views.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#1227169

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Can you please check now.
=> hidden link

I've adjusted the view's loop editor code as given under:
=> hidden link

<div class="lp-shwo-programm">
<div class="lp-show-start"><div class="lp-show-start-tag">[types field='show-start' style='text' format='l'][/types]</div><div class="lp-show-start-datum">[types field="show-start" style='text' format='j.m.Y'][/types]</div><div class="lp-show-start-uhrzeit">[types field='show-start' style='text' format='H:i'][/types]</div></div>
  
  
<div class="lp-show-ort"><div class="lp-show-ort-icon"><img src="[types field='location-icon' output='raw' resize='proportional' item='@location-show.parent'][/types]" alt="" height="40" width="40"></div><div class="lp-show-ort-name">[wpv-post-title item="@location-show.parent"]</div></div>
  
<div class="lp-show-eintrag"><div class="lp-show-titel"><h4>[wpv-post-title]</h4></div><div class="lp-show-art">[wpv-post-taxonomy type="auffuhrungs-typ"]</div><div class="break"></div><div class="lp-show-excerpt">[wpv-post-body view_template="None"]<span class="lp-show-dauer">Dauer: [types field="show-dauer"][/types]</span></div></div>
</div>

I also added [wpv-post-body view_template="None"] shortcocde as the test you shared with sample view is added to post body field. If you want you can replace this shortcode with [wpv-post-excerpt format="noautop"].

#1227191

So what i manly did wrong was that i added "item="@artist-show.parent" right?

#1227192

So I first told him to get a list with the values of the related shwos and than told him to replace them with the values of "artisten" instead... ?

#1227198

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

So what i manly did wrong was that i added "item="@artist-show.parent" right?
=> Yes, because you are querying the "shows" using view so no need for item attribute.

#1227200

So again, the problem is sitting infront of the computer 😉