Skip Navigation

[Resolved] how to filter a custom post items view by specific user role log in

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

Problem:

I have a custom post type and the content for it is created by different individual. I would like to create view or a content template that only shows their individual posts .

Solution:

You can setup a post view, filter by post's author is current logged-in user.

Relevant Documentation:

https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/

This support ticket is created 4 years, 2 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 – 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 4 replies, has 2 voices.

Last updated by curtisT-2 4 years, 2 months ago.

Assisted by: Luo Yang.

Author
Posts
#1846753

Tell us what you are trying to do?
I have a custom post type and the content for it is created by different individual. I would like to create view or a content template that only shows their individual posts .

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?
hidden link

#1846851

Hello,

You can setup a post view, filter by post's author is current logged-in user, see our document:
https://toolset.com/documentation/user-guides/views/filtering-views-query-by-author/

#1847219

I can't seem to find the filter query in the view when I created. I am using the updated version of toolset

#1847965
query-filters.JPG
query-filter.JPG

If you are using classic editor to setup the view, you can try this:
Edit the view, click link "Screen Options", enable option "Query Filter", see my screenshot query-filter.JPG

If you are using view block, you can find and select the view block, in the sidebar, section "Content Selection", there is a section "Query Filters", see my screenshot Query-Filters.JPG

#1853331

My issue is resolved now. Thank you!