[WordPress] 外掛分享: Minimal Search Term Highlight

首頁外掛目錄 › Minimal Search Term Highlight
全新外掛
安裝啟用
尚無評分
2652 天前
最後更新
問題解決
WordPress 4.4.0+ PHP 5.6+ v1.0.1 上架:2018-08-08

內容簡介

這個簡單且輕量級的外掛可以在搜尋結果頁面上突顯搜尋字詞。當您透過搜尋結果導向至內容頁面時,搜尋字詞也會在內容頁面上被突顯。此功能是透過在搜尋結果頁面中使用專門的 URL 實現的。

突顯搜尋結果和內容頁面上的搜尋字詞
不需要進行任何設置
不會使用 JavaScript
不會使用 StyleSheet
僅使用 WordPress 的標準 hook
僅有 30 行程式碼

突顯

這個功能是透過將每個搜尋字詞使用<mark> 標記包裹實現的。此外掛不提供任何樣式,通常瀏覽器會使用明亮的黃色背景來顯示標記。建議在您的佈景主題 CSS 中定義自己的 mark 樣式。

安裝

只需安裝和啟用外掛即可,不需要進行任何設置。

疑難排解

大多數情況下,外掛可以直接使用,如果您遇到任何問題,這可能是由於您的佈景主題或網站上的其他外掛不相容所致。請在支援區塊中開啟主題,我們會一起解決問題。

外掛標籤

開發者團隊

⬇ 下載最新版 (v1.0.1) 或搜尋安裝

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「Minimal Search Term Highlight」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

This minimal and lightweight plugin will highlight search terms on your search result page. Furthermore, when you navigate to a content page via the search result, the search terms will be highlighted on the content page as well. This works by using specialized URLs on the search result page.

Highlight search terms on the search result and content pages
No configuration needed
No JavaScript
No StyleSheet
Only standard WordPress hooks used
Only 30 lines of code

Highlighting
The highlighting works by wrapping each search term with tag. The plugin does not provide any styling. Browser’s typically display mark tags with a bright yellow background. It is recommended to define your own styling for mark elements in your theme CSS.
Installation
Simply install and activate the plugin. No configuration is needed.
Troubleshooting
In most cases, the plugin works out-of-the-box, should you experience any problems it is most likely due to an incompatibility with your theme or another plugin on your site. Please open a topic in the support section and we’ll figure it out together.

延伸相關外掛

文章
Filter
Apply Filters
Mastodon