內容簡介
你知道在一個網站上搜尋某個東西,然後只找到一個結果,需要點進去才能看到嗎?這很煩人。而且這還會增加一個不必要的頁面加載時間。
要是你搜尋的標題正好有一個完全匹配的結果,卻還是會顯示其他可能的結果。嘿,為什麼你不直接給我展示我剛剛搜尋的那個標題呢?嗯,這個外掛可以做到。很棒,對吧?
這個外掛就是去掉這個中間的步驟——如果你的搜索只返回一個結果或者你輸入了一個精確的標題,那麼它會快速、直接地顯示出帖子/頁面(選擇性地刪除)。除了更快的搜索體驗,去除這個步驟也會提升你網站的可持續性(好吧,可能只有一點點……但是每一點也很有用,對吧?)
此外,這個代碼還遵循了 WordPress 和 WordPress VIP 的編碼標準。
感謝我同事 Kailey 的原始代碼,我已經使用它很多年了,現在我覺得是時候分享出去了
圖標為非常有才華的 Janki Rathod所貢獻。
👉 請造訪Github頁面以獲取最新代碼、計劃中的增強功能和已知問題 👈
外掛標籤
開發者團隊
原文外掛簡介
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 for the original code, 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.
Please visit the Github page for the latest code development, planned enhancements and known issues
