Skip Navigation

[Resolved] Grabbing user ID in current post

This support ticket is created 5 years, 6 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/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by amarildow 5 years, 6 months ago.

Assisted by: Waqar.

Author
Posts
#1246829

1. Made a custom post type called "profiles", user creates his profile page as a post;
2. Followed the guide: https://toolset.com/learn/how-to-create-a-messaging-system-with-toolset/
3. Added a link to the new message form but need to get the user ID from the author of the custom post, it however grabs the current user ID, resulting me sending a message to myself.

Not sure what I'm doing wrong here.

#1246938

Hi there,

Thank you for contacting us and I'll be happy to assist.

The way "wpv-post-author" shortcode works, it returns the ID of the user who is the author of the current post/page.
( ref: https://toolset.com/documentation/user-guides/views-shortcodes/#vf-154504 )

Can you please make sure that this new message form is indeed placed in a post, where you are not the author?

In case the issue still persists, you're welcome to share temporary admin login details along with the link to the post where this form can be seen.

Note: Your next reply will be private and though no changes will be made on your website, please make a complete backup copy, before sharing the access details.

regards,
Waqar

#1247635

My issue is resolved now. Thank you!