-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
86 lines (54 loc) · 4.47 KB
/
readme.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
=== Solo ===
Contributors: dartiss
Donate link: https://artiss.blog/donate
Tags: result, search, single, solo, title
Requires at least: 4.6
Tested up to: 6.5
Requires PHP: 7.4
Stable tag: 1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Instantly display a single search result.
== Description ==
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).
**Please visit the [Github page](https://github.com/dartiss/solo "Github") for the latest code development, planned enhancements and known issues**
== Installation ==
Solo can be found and installed via the Plugin menu within WordPress administration (Plugins -> Add New). Alternatively, it can be downloaded from WordPress.org and installed manually...
1. Upload the entire `solo-search` folder to your `wp-content/plugins/` directory.
2. Activate the plugin through the 'Plugins' menu in WordPress administration.
It's now ready to go. By default, not all features are active - head to Settings -> General -> Solo for all the options.
== Frequently Asked Questions ==
= Why do you have to switch on the "exact match" option? =
Because, if you're using pretty generic titles (e.g. "Twitter") then you may not want this behavior.
Let me explain.
On my own site (artiss.blog - always a good read. Never dull. Please subscribe), I often use short, single names for pages. "About", "Blog", that kind of thing. For my posts, however, I use something long and descriptive. For example, "See what the stars of The Banana Splits look like now. Number 3 will amaze you". For this reason, I have exact matching switched off for pages but on for posts - if someone types in that post title than they are very welcome to have it served straight up to them.
= For the "exact match" feature, it only works for posts and pages. Can I add additional taxonomies? =
What kind of monster are you?
But, seriously, not at the moment. But if this interests you, please let me know!
== Screenshots ==
1. The settings that are available
== Changelog ==
I use semantic versioning, with the first release being 0.1.
= 1.1 =
* Enhancement: The code was getting quite big so I've split it into a number of files, with a control file bringing them all together. It's a big change, so required a bigger jump in revision, despite there being no visible changes.
* Enhancement: Also added some spit and polish across the code and README more generally
* Enhancement: Added an uninstaller file to get rid of any cruft when you remove the plugin (not that you'd ever do that of course!)
= 1.0.1 =
* Enhancement: Improved code quality
= 1.0 =
* Enhancement: You didn't ask for it, but you got it anyway - the search will now display content if you search for an exact match on the title
* Enhancement: Settings now allow you to turn each of the options on and off, to your likely. You can switch them all of, if you want, although that's a waste of an active plugin, if we're being honest
* Enhancement: Added a link in the plugin meta so you can go straight to the settings. Because I care
* Maintenance: Various tweaks and fiddles, some of which may even be legal
= 0.2 =
* Bug: Fixed text domain
= 0.1 =
* Initial release
== Upgrade Notice ==
= 1.1 =
* No new features but a big shake-up of the code layout