
內容簡介
自訂搜尋欄位提示文字!
Search Placeholder Avada 可以讓您在 Avada 的搜尋欄位加入自己的提示文字。
現在已支援所有 WordPress 佈景主題。
使用方法
Search Placeholder Avada 原本是由 ThemeFusion 為 Avada 設計的,現在可以使用在任何一個佈景主題上。
在 2.0 版本中,已內建支援 Avada 和 WordPress 的預設佈景主題。同時,您也可以使用 PHP hook (filter) 加入任何您需要的 CSS 選擇器。
外掛的設定位於「設定」>「Search Placeholder Avada」下方。
任何佈景主題皆支援的範例 filter
/** Search Placeholder Avada:編寫專屬於您自己的 CSS 選擇器。使用逗號分隔符號區隔選擇器 */
add_filter( 'search_placeholder_css_selectors', function() {
return ".this-is-a-test-class, #this-is-a-test-id, .another-class";
}
);
根據您的需求調整 filter,然後添加至子佈景主題的 functions.php 檔案或使用支援添加 PHP hook 的程式碼片段外掛。
免責聲明
Search Placeholder Avada 外掛及其作者與 Avada 或 ThemeFusion 無任何關聯。
外掛標籤
開發者團隊
原文外掛簡介
Customise your search placeholder text!
Search Placeholder Avada allows you to add your own custom placeholder text for Avada’s search input box.
There’s new support for all themes.
Usage
Originally built for Avada by ThemeFusion, you can now use this on any theme.
With version 2.0, there’s built-in support for Avada and WordPress default themes. You can also use a PHP hook (filter) to add any CSS selector you need.
The plugin settings are under Settings > Search Placeholder Avada.
Example Filter for Supporting Any Theme
/** Search Placeholder Avada: filter for your own CSS selectors. Separate selectors with a comma. */
add_filter( 'search_placeholder_css_selectors', function() {
return ".this-is-a-test-class, #this-is-a-test-id, .another-class";
}
);
Tweak the filter for your needs. Then, add it to your child theme’s functions.php file or use a code snippets plugin that supports adding PHP hooks.
Disclaimer
The Search Placeholder Avada plugin and its author are not affiliated with Avada or ThemeFusion in any way.
