Skip Navigation

[Resolved] Parametric search for logged in users

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

Problem:
How can I create a post View that displays only the posts of the current logged in user?

Solution:
1. Add a view with "Full Custom Display"
2. Add a Query filter as:

Select posts with the author the same as the current logged in user.

3. Add any Custom Filter in the Custom Filter section you need.

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

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)

Author
Posts
#595221

I want my users to filter their - and only their - posts based on the fields of a custom post.

If I try to create a View that is filtered by "author=logged-in-user", then the View does not let me create a search based on specific parameters; alternatively, if I set up a parametric search, then the View shows all posts of all users (including posts that are somebody else's).

My question:

Is it possible to create a View that enables a user to filter (only) their custom posts in a parametric search?

Alternatively, is it possible to create a View with one filter that the user cannot change (so I can select the logged in user) and another that the user can change (a parametric filter)?

I believe this is not just a nice-to-have, but a security issue that Toolset Access should handle since a user should be able to search and filter only his or her own posts.

Thanks.

PS: I see an old thread on this topic (https://toolset.com/forums/topic/parametric-search-view-with-post-author-selection) that has been marked resolved, but it is not.

#595301

1. Add a view with "Full Custom Display"
2. Add a Query filter as:

Select posts with the author the same as the current logged in user.

3. Add any Custom Filter in the Custom Filter section you need.

This works fine.

Can you give it a try and if you see any issues, share them with me?

Thanks!

#595401

Yes, that works.

I used full custom mode to set the query filter to author and then chose "author the same as logged in user".
Then I scrolled down to the filter area and selected a custom filter.

Thank you.
[by the way, you may want to do something about this same issue with no resolution before (https://toolset.com/forums/topic/parametric-search-view-with-post-author-selection).