https://github.com/dartiss/solo
Instantly display a single search result.
https://github.com/dartiss/solo
search wordpress wordpress-plugin
Last synced: 4 months ago
JSON representation
Instantly display a single search result.
- Host: GitHub
- URL: https://github.com/dartiss/solo
- Owner: dartiss
- License: gpl-2.0
- Created: 2020-09-24T14:45:44.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2024-04-20T15:04:35.000Z (about 2 years ago)
- Last Synced: 2024-04-20T16:57:23.204Z (about 2 years ago)
- Topics: search, wordpress, wordpress-plugin
- Language: PHP
- Homepage: https://wordpress.org/plugins/solo-search/
- Size: 201 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Solo
You know when you search for something on a site and it finds just one result? You then have to click into it to display it. That's annoying. It's also adding an extra page load which is not necessary.
And what about if you search for an exact match for a title and, well, it serves it up along with a number of other possible results. Hey, why didn't you just show me the one that I typed the name of in exactly? Well, you can do that too. Cool, eh?
This plugin simply removes this middle step - if your search returns one result or you type in the name of a title, it will be shown in all its post/page (delete as appropriate) glory. As well as a quicker answer for your visitor, removing this improves your site's sustainability (okay, just a little... but every little helps, right?).
The code also passes WordPress and WordPress VIP coding standards. Because you're worth it.
Thanks to my co-worker [Kailey](https://profiles.wordpress.org/trepmal/) for [the original code](https://trepmal.com/2011/04/22/redirect-when-search-query-only-returns-one-match/), which I've been happily using on my own site for many years. I thought it was time to share the ♥️.
Iconography is courtesy of the very talented [Janki Rathod](https://www.fiverr.com/jankirathore).