Skip Navigation

[Résolu] Content template displays current user information instead of post author

Ce fil est résolu. Voici une description du problème et la solution proposée.

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 Il y a 8 années. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

Marqué : 

This topic contains 4 réponses, has 2 voix.

Last updated by ernestasK Il y a 8 années.

Assisted by: Beda.

Auteur
Publications
#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 WPML client and need related help, please open a new support ticket.