Redirect Users if They Can’t View Posts

The PublishPress Permissions Pro plugin allows you to redirect users who try to visit content that that they do have permission to view.

In another tutorial we showed how to create a teaser for restricted content. It is worth reading that guide before using this more advanced options.

In this guide, we'll see how to redirect users to a new URL if they try to access that content that they don't have permission to see.

  • Make sure you have PublishPress Permissions Pro installed.
  • Go to Permissions > Settings > Teaser.
  • Scroll down to “Redirect Page > Page slug (anonymous users)”
  • Enter [login] to redirect these users to the login area of your site. Alternatively, you can enter the permalink of another WordPress post.
Redirect User Restricted
Redirect User Restricted
  • Alternatively can enter page slugs into the “Redirect Page” fields. In the image below, non-logged in users will be sent to the /welcome/ URL.
Hidden Content Teaser
Hidden Content Teaser

Professional publishing plugins for WordPress! Get PublishPress