Error 404 pages are where servers direct browsers when a URL seeks a missing page. While it’s easy to think you won’t really need a 404 page with a WordPress install, you’d be surprised. Even though all the links to the article or page you deleted are removed automatically from within your site, someone else might have created a link on their site to your post, which will no longer work.
That is what happens to me. I have shifted my blog to a new server and it’s creating a lot of problems for my blog. Most of the time this new server is down and I have to redirect my blog to my previous server which doesn’t have the latest posts.
In order to create a custom 404 template file, follow these steps:
Total Time: 5 minutes
Copy the contents of your page.php template file into a new template filenamed 404.php template file.
You can remove the entire loop from the file.
Place in some encouraging text and the PHP code to include the search.php template file:
Not Found
Sorry, but you are looking for something thatisn’t here.
Add the #sidebarLT XHTML div and PHP WordPress template tag back in under the content div:
Before submitting your comment, we kindly ask that you read our comment policy. Your email address will remain confidential and will not be published or shared anywhere. If you subscribe, you will receive notifications regarding new comments.