WordPress.org

Ready to get started?Download WordPress

Forums

404 showing on private page (3 posts)

  1. kurthzone
    Member
    Posted 3 months ago #

    I've spent way too much time trying to figure out a solution to Wordpess' 404 reporting of "Private" pages and quite frankly I'm a little steamed. If a user is attempting to load a page which can only be seen by registered users a "404" appears. THIS IS AN ERROR MESSAGE no matter what you make it say or do. In Joomla, which is much more sophisticated with the manner in which it handles permissions and users, this would not be a "404" but would remind a user to login in order to access the page because the page DOES EXIST but requires login to see it, therefore a 404 is not apropos. I don't know of any other CMS that has this 404 issue. But of course they didn't evolve from a blog. Is this just too hard for WordPress to fix. I've seen this issue posted in forums going back 8 years. Changing the 404.php is not a viable solution and neither is hacking the core. This is something that should be fixed by WordPress. If there is a plugin out there I can't seem to find it. Found one called wp-private but don't trust it because URL listed for it at WordPress.org goes to the default cpanel page: Anyone else out there finding this an issue? I would use Joomla but my client insisted on WordPress because she heard it was easier to make edits in the back end.

  2. kjodle
    Member
    Posted 3 months ago #

    Changing the 404.php is not a viable solution and neither is hacking the core.

    Agreed, but you can always create a child theme with a custom 404 page that will display whatever you want, including a log in link.

    It seems to me that there should/might be a function to include in a child theme functions.php file to handle redirection of private pages to a log-in page, but I haven't searched for it before.

  3. esmi
    Forum Moderator
    Posted 3 months ago #

    this would not be a "404" but would remind a user to login in order to access the page because the page DOES EXIST but requires login to see it, therefore a 404 is not apropos.

    Already been raised as a bug and rejected.
    https://core.trac.wordpress.org/ticket/23407

Reply

You must log in to post.

About this Topic