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 documentation article we show how to create a teaser for restricted content. It is worth reading that guide before using this more advanced option.

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 > Teaser.
  • Click the “Redirect” tab.
  • For “Anonymous Visitors”, choose “Redirect to WordPress Login”.
Redirect tab for anonymous users
  • Alternatively, if you have a custom login page, you can choose “Redirect to a Custom Page” in the dropdown. Then you can select the page under the “Page Selection” dropdown.
Redirect tab for anonymous users and custom login pages
Hidden Content Teaser