Skip Navigation

[Resolved] Views filter: “Post author is NOT the same as the logged in user”

This thread is resolved. Here is a description of the problem and solution.

Check if current user is the same as the author of a post.

This can be done by using our views conditional code.
[wpv-conditional if="( '[wpv-current-user info="id"]' eq '[wpv-post-author format="meta" meta="ID"]' )"]

Some Content


This support ticket is created 5 years 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.

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
- 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)


This topic contains 2 replies, has 2 voices.

Last updated by tony 5 years ago.

Assisted by: Shane.


Tell us what you are trying to do?
I want to add a filter to a View so that any posts with the same author as the logged in author are excluded.

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

I can select posts where "Post author is the same as the logged in user" but what I need is to filter out posts where this is the case.

ie. How can I select posts where "Post author is NOT the same as the logged in user"?

I thought I might be able to get at the select code and change an = to ne.


PS I meant to add - my current solution is to modify the display template with:
[wpv-conditional if="( '[wpv-current-user info="id"]' eq '[wpv-post-author format="meta" meta="ID"]' )" evaluate="false"]
[wpv-post-link]<br />



Languages: English (English )

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

Hi Tony,

Thank you for contacting our support forum.

Your current solution is the way to do it, unless you want to use a php hook, then this should be able to achieve the same results.



Thanks Shane - I just wondered if there was a simpler way.
Kind regards

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