Skip Navigation

[Resolved] Content template displays current user information instead of post author

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

Problem:
How to display Current user or Post author information in a post or View?

Solution:
For the Current user's information, you can use:
https://toolset.com/documentation/views-shortcodes/#wpv-current-user

For the Current Post's author instead:
https://toolset.com/documentation/views-shortcodes/#wpv-post-author

This support ticket is created 8 years, 3 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
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by ernestasK 8 years, 3 months ago.

Assisted by: Beda.

Author
Posts
#378382
billing-email.jpg

I am trying to: Display author information

I visited this URL: Created a content template with <div>Seller email: [wpv-user field="billing_email" ID="[wpv-post-author format='meta' meta='ID']"]</div>

I expected to see: Author email from woocommerce billing data

Instead, I got: current user email. If user is not logged in - it's empty.

Please help

#378466

Did you manually create that ShortCode instead of inserting it with the Views GUI?

Because things like ID should be lower case "id".

This ShortCode works properly fine locally, as long the current Product is authored by a certain user.

Thank you

#378498

I have inserted it with the views GUI. Tried lowercase still no luck.

Tried [wpv-post-author format='meta' meta='user_email'][wpv-post-author format='meta' meta='ID']
Does not show anything. Just empty.

I can give you logins to clone site. Check yourself.

#378499

I just find out - something in the template causing author data to disappear. Maybe you have a hint what can cause that?

#378502

I just find out that content template was assigned wrong way. I fixed it by assigning it via content template usage.

This ticket is now closed. If you're a Toolset client and need related help, please open a new support ticket.