How to redirect dead link on wordpress ?
This article is made by www.kelleyburrus.com
and was first published on January 15th, 2008. This article is free to redistributed for non-commercial purposes as long as you include the name of the author and source, and not make changes to the contents of the article.
When the visitor visit the link that has die or a post that has been deleted by the owner of the website / blog. Most of the visitor that see a page like this will soon close the page and (if the visitor comes from search engines) will soon open the next search engine results.
Of course we do not want things like this happen on our blog visitor, the visitor close our blog because they do not find what they are looking for.
We can make a redirect (divert) eror 404 pages to other URL as we like, for example to the home or to a kategory. How to do that ? the answer is by edit the 404 template (404.php) through the Theme Editor.
Here is the steps :
- Dashboard of WordPress (WP-admin) menu go to Theme Editor.
- Select File 404 Themes Template (404.php). The nyou fwill found php code like this (not always the same):
- <?php get_header(); ?><div id=”content”>
<div id=”wrap”>
<div id=”contentleft”>
<div class=”postwrap”>
<h2><?php _e(’404 – Not Found’); ?></h2>
<p><?php _e(‘Sorry, no posts matched your criteria.’); ?></p>
</div>
</div>
<?php get_sidebar(); ?>
</div>
</div>
<!– The main column ends –>
<?php get_footer(); ?>
- Erase all the code and replace with the following code:
- <?php
header(“Status: 301 Moved Permanently”);
header(“Location:http://www.derstinationUrl.com”);
?>
- Change http://www.destinationUrl.com with the destination URL you want to do, eg to the home page of your blog.
- Click the Update File, then done.
Now if a visitor open your dead link or typed wrong url they will automatically redirect to your blog homepage.
- sorry no posts matched your criteria wordpress redirect
- how to redirect to homepage in wordpress no posts matched your criteria
- wordpress redirect sorry no posts matched your criteria
- wordpress redirect deadlinks
- wordpress redirect dead url
- wordpress redirect change sorry no posts matched your criteria
- wordpress deadlinks redirect
- wordpress deadlink redirect
- sorry no posts matched your criteria wordpress
- Sorry no posts matched your criteria redirect to homepage
Related posts:
Thank you much for this informational blog post.
Good dispatch and this fill someone in on helped me alot in my college assignement. Say thank you you for your information.
Thanks for this useful article.