[thebestsolver.com] So that web visitors do not leave our website if found 404 errors, so we must customize, what should we do with file 404, we will customize 404 file with recent post, how do it?
Copy code below, then paste in your 404 file and also search.php file after your post content
<h3>Recent Posts</h3>
<ul>
<?php
query_posts('posts_per_page=5');
if (have_posts()) : while (have_posts()) : the_post(); ?>
<li><a href="<?php the_permalink() ?>" title="Permalink for : <?php the_title(); ?>"><?php the_title(); ?></a>
<?php endwhile; endif; ?>
</ul>
Rating: 5 like it» Reviewed by Best Solver on In Customize 404 Not Found on WordPress
[...] visitor the website can’t found article always display error 4o4, this is not good for SEO, so How to redirect 404.php in wordpress ? OK, open 404.php file your [...]