Skip Navigation

[Resolved] Unique emails

This support ticket is created 4 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
- 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/Hong_Kong (GMT+08:00)

This topic contains 1 reply, has 2 voices.

Last updated by Luo Yang 4 years, 1 month ago.

Assisted by: Luo Yang.

Author
Posts
#1858659

Hi, I have a Views's query that extract emails addresses from a CPT.
The problem is that the same email address can be stored in more than one post.

Is it possible to avoid having these duplicates on Views?

Thanks

#1858715

Hello,

I assume we are talking about a custom email field created with Types plugin.
Are you going to display one post per email?

If it is, there isn't such kind of built-in feature within Toolset plugins, since the email field field isn't unique value, so you won't get unique results.

Toolset Views/Blocks plugin is using WP_Query to query posts, see WP document:
https://developer.wordpress.org/reference/classes/wp_query/#custom-field-post-meta-parameters
There isn't such kind of built-in feature too.

You might consider custom codes, I have search it in google, and found some related threads:
https://wordpress.stackexchange.com/questions/196262/list-all-unique-custom-field-values