Skip Navigation

[Resolved] exclude authors in a view

This support ticket is created 7 years, 8 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
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by emanuelaB 7 years, 8 months ago.

Assisted by: Shane.

Author
Posts
#438002

I am trying to: create a post view that EXCLUDES an author

I know that I can create a view that lists only posts by a single author, but I need to EXCLUDE an author.

I can do that with php, with something like

$query = new WP_Query( 'author=-1' );

Is it possible to do that with Views?

Thanks in advance, Luca

PS: to be precise , I should exclude SOME authors , but it would be a good result also to exclude just a single one.

#438114

Shane
Supporter

Languages: English (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Emanuel,

Thank you for contacting our support forum.

In order to do this you will need to write a custom query filter for views.

For assistance on this you can take a look at the link below.
https://toolset.com/documentation/user-guides/views-filters/wpv_filter_query/

Please let me know if this helps.
Thanks,
Shane

#438176

Hi Shane
thank you very much, it's exactly what I was looking for.
best regards, Luca

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