Skip Navigation

[Resolved] Retrieve user custom field of post author

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

Problem:

Display post's author information in editing post form.

Solution:

You can use "HTML content" element, like this:

[types usermeta='user-number' user_id='[wpv-post-author format="meta" meta="ID"]'][/types]

Relevant Documentation:

This support ticket is created 3 years, 10 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
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9: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/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by Puntorosso 3 years, 10 months ago.

Assisted by: Luo Yang.

Author
Posts
#1930569

Hi,
I use a Cred Form in a template, to update a custom post ("Inquiry"),.
Before the form, I would need to display a User Custom Field (user-number), related to the author of that custom post.
I have tried

[types usermeta='user-number' user_id='[wpv-post-author format="meta" meta="ID"]'][/types]

but it doesn't work.

#1930679
html-content.JPG

Hello,

I have tried it in my localhost (fresh WP installation + the latest version of Toolset plugins), with below steps:
1) Create a custom user field "user-number"
2) Create a user form for editing user
3) In the form content, add a "HTML content" element, with the same codes you mentioned above:

[types usermeta='user-number' user_id='[wpv-post-author format="meta" meta="ID"]'][/types]

See my screenshot html-content.JPG

It works fine in front-end, I can see correct custom user field value.

Is there any missing? please provide detail steps to reproduce the same problem, thanks

#1931627

Solved, thanks.