An open API service indexing awesome lists of open source software.

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.

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).