Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Montezuma Theme (http://forum.bytesforall.com/forumdisplay.php?f=53)
-   -   Custom Montezuma 404 page (http://forum.bytesforall.com/showthread.php?t=19635)

jerryc Feb 15, 2013 01:24 AM

Custom Montezuma 404 page
 
No need for a 404 plugin. With MZ, simply make your own main template 404.php, copying something like page.php.

In the content div, put something like "404 Page Not Found" between the <h1> tags and remove everything else between those tags.

In the post-bodycopy div, put your custom message (you'll need to use <p> tags) and remove everything else. Links to your home page, search page, site map, last post, and/or whatever you want can be included.

Save the template. To test it, simply enter a nonexistent page url of your site into your address bar.

Here's the official WP codex doc.

As an example, here's what I put up for now:

Code:

<h1>404 Page Not Found</h1>
               
<div class="post-bodycopy cf">

  <p>Oops!</p>
  <p>The page you requested wasn't found.</p>
                     
</div>

My main menu, with a link to my home page is in the sidebar. I'll add a link to a site map after I make one.

It's possible I could have stripped out more code from the template to make it more elegant, but I didn't dig into what that would do.

juggledad Feb 15, 2013 04:36 AM

If you want this to be a 'How To:' give a step by step guide with examples and edit your explaination to be clear. in your second line you state
Quote:

In the content div, put something like "404 Page Not Found" between the <h1> tags and remove everything else.
The you start talking about the post-bodycopy div, but in the previous statement you said to remove everything else from the content div. I know what you meant to say, but it's not what you said.

Neut Mar 18, 2013 02:18 PM

Thanks jerryc :)

typo Apr 12, 2013 10:15 PM

This post is very helpful for creating the 404 page.


All times are GMT -6. The time now is 11:59 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.