The subject says it all, say you run a search for “tree” and there is only one matching result instead of showing you the title of the result and an excerpt, how about just direct you right to the full content for that entry?
Anyone executed this functionality, know of a solution or have thoughts on one? I wanted to poll the community first before attempting to write one.
If I have to write one I am thinking of using the search counter, and doing something like … in search.php in the header put a redirect condition before any other PHP that says, If search results = 1 …. Redirect to the_permalink
Just a thought .. not sure it would work.
- The topic ‘Search function: If only one matching result, go right to that page directly.’ is closed to new replies.