If the search results are only in one post, then how to redirect in that post?

1
481

How are you all? I hope all of you are fine. Today I will discuss with which subject, that is search results are only in one post, then how to redirect in that post?

How to Redirect to post when a search query returns a single result?

wordpress2

When any visitor search anything in own search box of WordPress then search results are shown in list form. If search’s results are only in one post, but in that post for redirecting, you can improve your search engine.

Previous Article: How to upgrade WordPress comparatively in slow server?

For improving search engine, paste following code in function file (functions.php) of your theme. Save that file. Now if search engine gets only one post of searching, it will redirect in that post.

Those who don’t read my previous post, for them previous post of WordPress link is given in the following.