Skip Navigation

[Resuelto] display usermeta belongs to parent post author

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

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 hace 5 años, 11 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Etiquetado: ,

Este tema contiene 5 respuestas, tiene 2 mensajes.

Última actualización por domenicoS hace 5 años, 11 meses.

Asistido por: Minesh.

Autor
Mensajes
#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

Idiomas: Inglés (English )

Zona horaria: 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

Idiomas: Inglés (English )

Zona horaria: 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!