Skip Navigation

[Resolved] Display userid publically of current post

This support ticket is created 5 years, 7 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
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 1 reply, has 2 voices.

Last updated by Christian Cox 5 years, 7 months ago.

Assisted by: Christian Cox.

Author
Posts
#1250415

I have usermeta data I can display publicly, like:

return do_shortcode('[types usermeta="child-name" output="raw" user_name="[wpv-search-term param=church]"[/types]');  

But how do I display the user id of the current post publically? I have tried this but it doesn't work:

return do_shortcode('[types usermeta="ID" output="raw" user_name="[wpv-search-term param=church]"[/types]');  

Can you help?

#1250435

But how do I display the user id of the current post publically?
I assume you mean the User ID of the current post author, correct? Since User ID is not a custom field, you cannot use the Types field shortcode. You can use the wpv-post-author shortcode to display information about a post's author. For example, you can place this shortcode in a View of posts:

Author ID: [wpv-post-author format="meta" meta="ID"]

We have more information about that here: https://toolset.com/documentation/user-guides/views-shortcodes/#wpv-post-author