Skip Navigation

[Resolved] Why I can't Query filter by User email in views???

This support ticket is created 6 years, 1 month 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 6 years, 1 month ago.

Assisted by: Christian Cox.

Author
Posts
#1126846

Tell us what you are trying to do?
Pass user email to views and display the user information

I find it quite weird that you decided to include all types of users custom fields and metas, but excluded the email. Why?

#1127052

Hi, if you want to display a specific User's information you can pass a value into Views using a shortcode attribute, then access that value in the View's Loop. For example:

[wpv-view name="View of Posts" useremail="noreply@toolset.com"]

You can hard-code an ID, like 12345, or you can set the useremail parameter using another shortcode. Then inside the Loop, you can access the useremail attribute like this:

The User's email is [wpv-attribute name='useremail'].

You can also filter the View by post author using a similar process. This process is called passing arguments into Views, and is described in this document:
https://toolset.com/documentation/user-guides/passing-arguments-to-views

Let me know if you have questions about this, or if I have misunderstood your request.