Adorn 404 Page In WordPress To Retains Visitor From Leaving Our Blog

by Abi on January 1, 2009

Having 404 pages in our WordPress blog is a pain in the back, this usually happens in WordPress blog and the cause is vary probably because of the visitor write a wrong url address while trying to access our page or we accidentally or deliberately remove the page, thus the page no longer exist and 404 page appears to replace the removed pages.

And in this post, I will share the information to adorns your 404 pages to be visitor friendly by adding features. This feature will change the default look of 404 pages, actually you can put anything in your 404 pages even ads, but I’d rather to add something which have related to my blog like category, popular posts, most commented post and so on.

Here’s the trick, login to your WP dashboard and go to Theme editor and click 404 page (404.php). Let’s say you want to put “popular post”, “recent post” and “category” in your 404.php page, then add the following code to it:

<h2>Popular Posts</h2>
<ul>
<?php akpc_most_popular(); ?>
</ul>
<h2>Recent Posts</h2>
<ul>
<?php query_posts(‘showposts=10′); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<li><a href=”<?php the_permalink() ?>”><?php the_title() ?></a></li>
<?php endwhile; endif; ?>
</ul>

<h2>Category</h2>
<ul>
<?php wp_list_cats(‘&title_li=’); ?>
</ul>

(To display popular post in your 404 page you need “popularity contest plugin” by Alex king, download here, and to have recent post you need recent post plugin.)

And to see the example see my 404 page: Click here.

That’s the simplest way to adorn your 404 page, to retains visitors going away from your page. I hope this post useful to you, and see you in the next post in the Busby SEO Test Blog and happy new year and wish you all the best!

Related posts:

  1. Split WordPress Page Into 2 Pages
  2. How To Display Ads On Homepage Only In WordPress
  3. How To Get Back WordPress Widgets That Disappeared
  4. Permalink Migration Plugins To Permenantly Moved Ugly Permalinks Into Pretty Url
  5. SEO Your WordPress Description And Keyword Without Plugins

Previous post:

Next post: