Skip Navigation

[Gelöst] Content template displays current user information instead of post author

Dieser Thread wurde gelöst. Hier ist eine Beschreibung des Problems und der Lösung.

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 vor 8 Jahre, 2 Monate. 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.

Heute stehen keine Supporter zur Arbeit im Werkzeugsatz-Forum zur Verfügung. Sie können gern Tickets erstellen, die wir bearbeiten werden, sobald wir online sind. Vielen Dank für Ihr Verständnis.

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)

Dieses Thema enthält 4 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von ernestasK vor 8 Jahre, 2 Monate.

Assistiert von: Beda.

Author
Artikel
#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.

Dieses Ticket ist jetzt geschlossen. Wenn Sie ein Toolset Kunde sind und Hilfe benötigen, eröffnen Sie bitte ein neues Support-Ticket.