18 responses to “If you were a WordPress theme developer: 404 templates”

  1. Thomas Clausen

    I like this plugin: http://www.askapache.com/seo/404-google-wordpress-plugin.html but I don’t think it should take a plugin to make the 404 page more interessting.

  2. J Mehmett

    In my opinion, 404.php should have something useful to the visitor such as links to archive posts and pages or at least putting a link to the sitemap page or the archives page would be nice.

    Providing a search system in the 404’s content area is good idea, too, so the visitor will not hit the “Back” button but will search what s/he wanted, instead.

    There is a possibility to implement a code that extracts the typed url’s phrase and changes it to search or “Did you mean …?” or something like that. But, this can only be done when the permalink structure is selected as Pretty Permalinks and has the page/post name as the location path (e.g. http://justintadlock.com/archives/2008/10/04/if-you-were-a-wordpress-theme-developer-404-templates).

    However, in my opinion, 404 should stay neatly clean. It should have its own sidebar or no sidebar at all.

    That’s all I think about 404.

    :D

  3. Jylan Wynne

    Yeah I think that 404 pages should try to keep the visitor on the website, with a search function, maybe top posts or cateogories. And also what J Mehmett was mentioning about the url guessing script, Google has a sort of plugin with their website managment tools that you put onto a 404 page. When someone mistypes a url say, it will try to suggest the proper url based on its search index for your site.

  4. cubus

    Well, IMO, the first thing you have to do is avoiding 404 errors. There is a nice Redirection plugin which can help you doing so. (p.ex. It automatically adds a 301 redirection when a post’s URL changes)

    But when a vistitors lands on a 404 page from a search engine, it seems interesting to me to use the (Google / Yahoo) search query they used on an internal wordpress search and return the 3 most relevant results below the words “Maybe you were looking for this?”. Joost de Valk wrote an interesting article about improving your wordpress search results btw.

    Also a very short but clear message why they are getting this 404 page is essential to keep people on your site. If things really look like a big error page it’s more than obvious that visitors start running away again.

  5. ...paul

    It would, in my opinion, be a great addition to a theme if there was some easy way built-in to edit the 404 page. The default page in WordPress, and most themes, is pretty well useless.

    I’ve changed mine so that it has a somewhat more helpful message, links to various archives, my contact page, and my standard blog sidebar. One other thing I would like to include, but haven’t been able to get working, is a searchbox in the main text — there is one in the sidebar though. I’ve also included a jokey picture, which is really corny, but I like it.

    Most of what I’ve put in wouldn’t be out of place on the majority of sites, and so could be built into a theme as standard. But, if nothing else, an easy way to add what you want without having to directly edit php files (which is why I wondered about it for page templates) would be a real help.

  6. Pangeran | PANGERAN.ORG

    If we are too lazy to include the 404.php, just use the

    [?php else : ?]

    after the post loop… Very convenient…

    But, I do include 404.php in my theme…

    We can make our 404.php become more interactive by,

    1. Adding search form.
    2. Adding your archive list or categories.
    3. Or even put your sale ads in it…

    Just an opinion…

  7. J Mehmett

    Many websites use redirection when 404 error returns. So the mistyped URL will get back to the main index (home page) and I think this is the worst 404 ever. The user will confuse retrying the same URL, so its nice to tell the visitor that what s/he is looking for was either removed or never existed.

    @Jylan Wynne,

    Yea. The guessing script is pretty nice and will make all the possible efforts to keep the visitor on site. :P

  8. If you were a WordPress theme developer: Widget areas

    [...] give their feedback on how themes should work. We’ve already talked about page templates and 404 templates. So, add your input on those posts as [...]

  9. erica stjohn

    I have found it useful to include a sitemap on a 404. For me, if I cannot find what I am looking for because it has been moved, I like having the option of looking at all of the pages and posts in the site right there on the 404 error page.

    An example would be: http://www.aleeya.net/whatever
    (which doesnt exist) it tells you that the page is not found and gives you an option to look at the sitemap to see what is there.

    Though I like the idea of the 404 error page guessing, I can not seem to locate what I thought was a plugin for that which I saw.

    Also, for search engines, it is nice to have the internal links to other pages for a search engine to see if the page has been moved, etc. I have read a lot of positive things about that and SEO

  10. erica stjohn

    here you go. I believe this is the one I was looking for that guesses

    http://wordpress.org/extend/plugins/smart-404/

  11. WordPress developer? You are not alone! » hervedesign(dot)com

    [...] There again the amount of posts you could find on the net is huge. However some bloggers publish regularly tips and advises for WordPress developers. For instance Justin Tadlock started series of articles named If you were a WordPress developer and focused on interesting ways to get the maximum out of a WordPress theme. 3 articles were already published, and I advise you to go have a look at Widget areas, Page templates, 404 templates. [...]

  12. What one feature would you add to your WordPress theme?

    [...] 404 templates [...]

  13. What options should be in a WordPress theme settings page?

    [...] 404 templates [...]

  14. Looking back on 2008

    [...] If you were a WordPress theme developer: 404 templates [...]

  15. Albert K.

    as I said, I work with WP themes, and they have a 404 page, its very important, thanks for the post!

Leave a Reply

By submitting a comment here you grant this site a perpetual license to reproduce your words and name/Web site in attribution.

Please use your real name or a pseudonym (e.g., pen name, alias, nom de plume) when commenting. If you add your site name, company name, or something completely random, I'll likely change it to whatever I want.