[WordPress] 外掛分享: search-into-subcategories

首頁外掛目錄 › search-into-subcategories
10+
安裝啟用
★★★★★
5/5 分(2 則評價)
3112 天前
最後更新
問題解決
WordPress 3.0.1+ v1.1.1 上架:2014-03-07

內容簡介

點擊此處查看示範 http://codescar.eu/projects/search-into-subcategories

Search-Into-Subcategories 外掛可讓您為自己的分類建立選擇搜尋的短代碼。

您可以在任何地方使用它,並為您的分類建立樹狀結構。

[search-into-subcategories]

您可以傳遞以下參數:

parent_category 默認值為 0
您可以僅列出此處分類的子分類。使用 0 列出所有分類。

max_depth 默認值為 2
要顯示多少子分類(parent_category 的子孫)(至少1個)

search_input 默認值為 1
顯示用於搜索的文本輸入。(您可以使用0值關閉它)

labels 默認值為“空字符串”
輸入的標籤,以您希望的順序使用 "|" 作為分隔符。例如:Category1|Category2|Text

search_text 默認值為“搜索”
在搜索按鈕上顯示的文本。

hide_empty 默認值為 1
隱藏沒有內容的分類,設置為0以顯示所有!

exclude 默認值為“空字符串”
要從列表中排除的分類 ID。用“,”分隔它們。例如:6,7,13。

show_date_ranges 默認值為 0
顯示用於過濾發布日期的從/到日期範圍。設置為1以使用它。

dates_format 默認值為 DD-MM-YYYY
需要啟用 show_date_ranges。它使用Pikaday JS Library(一個小的JS庫)來創建一個日期選擇器並管理日期格式。
(如果您在格式中使用空格,請使用單引號'進行包裹)。
(格式設置是由momentJS https://momentjs.com/docs/#/displaying/ 生成的。)

custom_field 默認值為 null
要搜索的自定義元字段列表(它將為每個元字段創建一個新輸入框。
(使用逗號作為分隔符,例如:field1,meta_key,等)

custom_field_labels 默認值為 null
自定義元字段文本輸入中的標籤列表。(使用|作為分隔符,例如:name1|name2|等)

custom_post_types 默認值為 null
要過濾結果的文章類型。

posts_per_page 默認值為 null
設置每頁顯示的帖子數。

custom_taxonomy 默認值為 category
設置要遍歷的自定義分類。

示例:
[search-into-subcategories parent_category=0 max_depth=3 search_input=1 labels=cat1|cat2|cat3|Text search_text=Find
hide_empty=0 exclude=7,6 show_date_ranges=1 custom_field=author,my_custom
custom_field_labels=Author|Custom custom_post_types=documents posts_per_page=10
custom_taxonomy=my_taxonomy dates_format=YYYY-MM-DD]

外掛標籤

開發者團隊

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

① 下載 ZIP → 後台「外掛 › 安裝外掛 › 上傳外掛」
② 後台搜尋「search-into-subcategories」→ 直接安裝(推薦)
📦 歷史版本下載

原文外掛簡介

For Demo go here http://codescar.eu/projects/search-into-subcategories
Search-Into-Subcategories plugin allows you to make a select-search shortcode for your own categories.
You can use if everywhere you want and make a tree structure for your categories.
[search-into-subcategories]
Arguments you can pass:
parent_category Default is 0
You can list only sub categories of the category id you give here. With 0 lists alla categories

max_depth Default is 2
How many subcategories (children of the parent_category) to display, at least 1.

search_input Default is 1
Display a text input for search. (You can turn it off with 0 value)

labels Default is
Labels for the inputs. Give them in the order you want with '|' as separator. example: Category1|Category2|Text

search_text Default is Search
The text to display in search button.

hide_empty Default is 1
Hide categories without content, set to 0 to display all!

exclude Default is
Category IDs to exclude from listing. Separate them with ','. Example: 6,7,13

show_date_ranges Default is 0
Show from/to date ranges to filter publish date. Set it to 1 to use it.

dates_format Default is DD-MM-YYYY
It requires the show_date_ranges to be enabled. It uses Pikaday JS Library (a small one) to create a datepicker
and manage the date formatting. (If you use spaces into the format, wrap it into single quotes 'like this').
(The formatting is generated by momentJS https://momentjs.com/docs/#/displaying/ )

custom_field Default is null
List of custom meta-fields to search in (it will create a new input for every meta-field.
( Use , as separator, example: field1,meta_key,etc )

custom_field_labels Default is null
List for labels in custom meta fields text input. (Use | as separator, example: name1|name2|etc)

custom_post_types Default is null
Post type to filter results

posts_per_page Default is null
Set result page posts per page

custom_taxonomy Default is category
Set custom taxonomy to walk.

Example:
[search-into-subcategories parent_category=0 max_depth=3 search_input=1 labels=cat1|cat2|cat3|Text search_text=Find
hide_empty=0 exclude=7,6 show_date_ranges=1 custom_field=author,my_custom
custom_field_labels=Author|Custom custom_post_types=documents posts_per_page=10
custom_taxonomy=my_taxonomy dates_format=YYYY-MM-DD]

延伸相關外掛

文章
Filter
Apply Filters
Mastodon