Skip Navigation

[Resolved] Redirect users not part of my Post Group to another wordpress page

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 2 replies, has 2 voices.

Last updated by Paul Marconi 1 year, 11 months ago.

Assisted by: Luo Yang.

Author
Posts
#2564825

Hi there,

I have created a post group for a page restricted to certain users, so only the admin, editor and a custom role (that I created with Toolset Access) can access this page on the front-end. It's working. For users that are not part of the post group, when they land on that page, it's redirects them to the 404 page. Is there a way to redirect those users to another page (a page that I created in wordpress) instead of the 404 page?

Thank you!

#2565077

Hello,

There isn't such kind of built-in feature, you can try one of below workarounds:
1) Create a new content template, copy/paste that page content into this content template, and use this content template instead of the 404 page

2) Setup custom codes to redirect user to from 404 error to that page, for example:
https://stackoverflow.com/questions/65338474/redirect-wordpress-404-page-to-a-specific-page

#2565529

Thank you Luo! I actually used another way, so instead of using the Access Control, I created a custom php template
and wrote my own code to only let those allowed roles to view the content. The site is private and only logged in users can access the site, visitors will get redirected to the login page. Using the Access Control made that page public for non-logged in users.

Thanks again!