I have a page on my site which is part of a post group which only allows users with a specific role to access it. The page is here hidden link
When a user with a different role tries to access the page, they get the GeneratePress theme Page Hero which applies to that page and an otherwise blank page.
Is there a way to define what shows when access is denied to a page or form? Ideally I'd like to see a message and a login box. But ion any case, I thought the default was that a 404 page would show? This doesn't seem to be happening on my site.
Barring some intervention by some 3rd-party code visitors who do not have access to some post would be shown a 404 message, but you can change this to show a content template instead (which can include the content of your choice).
Click the little edit icon shown in the screenshot to bring up a dialog that lets you choose what to show.
The topic ‘[Closed] What is shown when access is denied to a page or form’ is closed to new replies.