Skip Navigation

[Gelöst] display usermeta belongs to parent post author

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

Problem:
display usermeta belongs to parent post author

Solution:
To display the custom user fields - you can use the shortcode:

[types usermeta='ragione-sociale' user_id='[wpv-post-author format="meta" meta="ID" item="@your-relationship-slug.parent"]'][/types]

You can find the proposed solution, in this case, with the following reply:
https://toolset.com/forums/topic/display-usermeta-of-parent-post-relationship/#post-1170506

Relevant Documentation:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-author

This support ticket is created vor 5 Jahren, 11 Monaten. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 5 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von domenicoS vor 5 Jahren, 11 Monaten.

Assistiert von: Minesh.

Author
Artikel
#1170405

Hi

I've a view where I display info about POST 1.

There is a relationship between POST 1 (parent) and POST 2(child).

In the POST 1 I have an AUTHOR 1
In the POST 2 I have an AUTHOR 2

In the view of POST 1 I display the title of POST 2 with this:

[wpv-post-title item='@accommodations-product.parent']

How can also display the meta of the author of POST 2? Like the email for example..

#1170439

For more info:
- the relationship slug is "accommodations-product" and the parent slug is "accommodations"

I tried with this:

[types usermeta='ragione-sociale' id="$accommodations"][/types]

But does not work, the result is empty.

#1170471

Minesh
Supporter

Sprachen: Englisch (English )

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

Hello. Thank you for contacting the Toolset support.

Well - to display the post author meta information you should try to use the following shortcode:

For example - to display parent post author nickname:

[wpv-post-author format="meta" meta="nickname" item="@accommodations-product.parent"]

More info:
=> https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-author

#1170492

Hi Minesh, thank you.
It works with nickname, but not with my user custom fields. I tried for example this:

[wpv-post-author format="meta" meta="ragione-sociale" item="@accommodations-product.parent"]
#1170506

Minesh
Supporter

Sprachen: Englisch (English )

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

Ok - so the custom user fields are a different thing here.

To display the custom user fields - you can use the shortcode:

[types usermeta='ragione-sociale' user_id='[wpv-post-author format="meta" meta="ID" item="@accommodations-product.parent"]'][/types]

Does above shortcode works?

#1170710

It's perfect! Thank you Minesh!