adsense

How to Add a 404 to a Wordpress Template





1. Open a new document in your code editing software. It needs to be totally blank, so remove any added code if you are using software such as Dreamweaver. Notepad will work for code editing, too.
2. Enter the following code in your blank document:

Error 404 - Page Not Found.




3. Save the document as '404.php' and upload it to your WordPress template directory with your FTP client software. It will be located at YourWordPressInstallation/wp-content/themes/YourTheme/.
4. Download your .htaccess file from the server using your FTP client software and open it in Notepad. It will be in your root directory.
5. Add the following line to the .htaccess file, if it is not already there:ErrorDocument 404 /index.php?error=404If your WordPress installation is in a sub-directory, you will need to add this line instead:ErrorDocument 404 /YourSubDirectory/index.php?error=404Save your .htaccess and upload it to your root directory.
6. Check to see that your 404 error page is working by entering a URL you know does not exist, such as http://YourSite.com/blahblahblah/.

Comments

0 Responses to "How to Add a 404 to a Wordpress Template"

Post a Comment

Popular Posts

About