April 6, 2015 at 6:54 pm
#7267
Syam Mohan
Keymaster
Hi Ahmed,
There are no filters or actions to hook into a 404 when the user doesn’t have permission. If you are familiar with editing PHP files and WordPress functions, you can create a custom 404 page with the content short-codes functionality and the following tutorial.
https://codex.wordpress.org/Creating_an_Error_404_Page
Even if you do this, every 404 will display the login page, not just the pages where they don’t have permission. I’ll add this to my to do list, but I’m not guaranteeing it at this moment.
Thanks
Syam