How to Edit the Default Forum 404 Page
Can you please tell me how I can edit the default 404 Page for the forum?
Currently this 404 page has the text:
"Oops! The page you requested was not found!
You can go to Forum Home page or Search here"
I'd like to edit this text to let people know they need to be logged in to the forum in order to see the private threads, as well as other basic information.
I found where I can change the Phrase "Page Not Found", but I can't find where to change the text in the error message.
Thanks for any help!
If you like to customize the appearance of the 404 page, you should customize the 404.php file located in /wp-content/plugins/wpforo/wpf-themes/classic/ folder.
Please read this doc for wpForo customization:
If you'd like to change only the phrases, please navigate to Dashboard > Forums > Dashboard admin page, click on [Rebuild Phrases] button, then navigate to Dashboard > Forums > Phrases admin page, find the phrases and change as you like.
One small part of our forum is on restricted access to only a few users.
When these users receive a notification email concerning a new message from this restricted area, and when they click the included link to view the message in the forum, they fall upon this 404 page.
The only exception is if they are already connected when clicking the link.
I precise that I followed thouroughly your step (1), @crisw.
This is not very elegant ! Would it be possible, in this specific case, to lead them to a page with a specific message, inviting them to login to see the page?
Thanks for your help!
Hi @copilot . Thank you for sharing your code. That will surely help those Admins who have their own customized LogIn and Register pages. 🙂
What I use in my forum is the wpForo Register and LogIn Pages. It was raised in my Forum too that if a post is set to "Standard Access" in a Private Forum, it's not clear to others that the page exists, but only visible to those who are logged in.
So I tweaked it some, and added the verbiage through "Phrases".
Here's how I did it.
1) Go to Forum Dashboard
3) On the search box, type "Page Not Found"
4) It will return two phrases:
"The Forum - Page Not Found" is the page title
"404 - Page Not Found" is the sub title in orange font.
5) So if you hover over that, you'll see the "edit" link, and you can click it
6) You should also type on the search box "Oops! The page you requested was not found!" - that's also the sub title in orange font.
So if you hover over that phrase, you'll see the "edit" link, and you can click it.
7) And you can just add whatever verbiage you want to inform visitors to either Register or Login.
8) Additionally, you can add a Register or Login Link on the 404.php page, on Line 21.
Something like: (Change the code in RED to your own)
<p><center><strong>Or you can <a href="https://www.YOUR-WEBSITE.com/COMMUNITY/?wpforo=signup" target="_blank" rel="noopener">Register</a> or <a href="https://www.YOUR-WEBSITE.com/COMMUNITY/?wpforo=signin" target="_blank" rel="noopener">Log in</a> and <a href="https://www.YOUR-WEBSITE.com/COMMUNITY/YOUR-CONTACT-PAGE/" target="_blank" rel="noopener noreferrer">Contact Us here</a></center></strong></p>
I don't recommend tweaking the 404 because as the Support Team suggests, it is not "update safe" - meaning any customizations will be overwritten on any future updates. (That's why I initially typed it might create more problems than it solves). But I think tweaking the "phrases" would be a tad bit safer. 🙂
And here is a sample of my "not elegant" 404 page 🙂