Skip Navigation

[Resolved] Only Diplay Users Custom Posts for that custom post Archive

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

This topic contains 1 reply, has 2 voices.

Last updated by Shane 7 years, 5 months ago.

Assigned support staff: Shane.

Author
Posts
#386812

1. I have ACCESS managing my CPT (for this specific CPT).
2. I have a view that filters this CPT based on the current user role. To return all the posts of this specific CPT in the users dashboard.
3. The problem is in the Archives page for this CPT. If I directly navigate my url to the CPT slug example:

 <em><u>hidden link</u></em> 

I then see all the ITEMS (posts) for that CPT rather than only seeing the ones that belong to that user/role.

How do restrict or filter my CPT archive in the same way I have filtered the VIEW, by only displaying the posts that belong to the current logged in user?

#387104

Shane
Supporter

Languages: English (English )

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

Hi William,

Thank you for contacting our support forum.

Unfortunately this is not possible with an archive view only.

What you need to do is create a separate view with a filter to display only the posts of the current user and then add that view to the custom archive template.

This will then cause the view the archive to display only the posts of the current user.

Please let me know if this helps.
Thanks,
Shane