Adorn 404 Page in Wordpress to Retains Visitor From Leaving our Blog

Author: Abi Bakar
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.

Taken from: Adorn 404 Page In Wordpress To Retains Visitor From Leaving Our Blog
About the Author:

I am a full time blogger and run several of blogs, and these two of them Busby SEO Test and Blog Tips

:

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google

This entry was posted on Friday, March 27th, 2009 at 1:47 am and is filed under Computer. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

Leave a Reply

Themes by WP Blog Shop | Entries (RSS) and Comments (RSS)