內容簡介
提供一個短代碼,用於顯示產品屬性的連結清單,例如從品牌屬性中顯示所有品牌連結。
特徵
顯示特定產品屬性的所有項目列表
選擇這些連結是否過濾產品或轉到項目存檔
隨著產品過濾,詞項列表不會減少
各種短碼屬性用於修改顯示內容
用法
使用下列短代碼,用您的屬性名代替 x:
[wcpas_product_attributes attribute="x"]
如果您的屬性名中有空格,則在短碼中用連字符替換這些空格。 如果您的屬性名中有其他字符,請查看下面的相關FAQ。
短碼使用某些預設屬性,如果需要,可以設置這些屬性:
archive_links - 1啟用封存連結,例如/brand/sega/,0禁用,例如/shop/?filter_brand=sega,預設值為0
hide_empty - 1隱藏空項目,0禁用,預設值為1
max_price - 使用最大價格數字以包括最大價格篩選器的連結,需要archive_links="0",預設值為空
min_price - 使用最小價格數字以包括最小價格篩選器的連結,需要archive_links="0",預設值為空
orderby - 任何orderby參數,預設值為name
order - asc 或 desc,預設值為 asc
show_counts - 1啟用每個詞項旁邊的計數,0禁用,預設值為0
使用可選短碼屬性的示例短碼:
[wcpas_product_attributes attribute="brand" archive_links="0" min_price="50.00" show_counts="1"]
外掛標籤
開發者團隊
② 後台搜尋「Product Attributes Shortcode」→ 直接安裝(推薦)
原文外掛簡介
Provides a shortcode to display a linked list of terms from a product attribute, such as all brand links from a brands attribute.
This extension is intended to be used where you want to display all terms from a product attribute, e.g. to display a list of all brands in the footer of your website. It is not intended to be used to display a list of terms associated with a specific product.
Features
Displays a list of all terms from a specific product attribute
Choose if these links filter products or go to term archives
List of terms does not reduce as products are filtered
Various shortcode attributes to modify the display/functionality
Elements include classes and IDs for custom CSS styling
Usage
Use the following shortcode replacing the x with your attribute name:
[wcpas_product_attributes attribute="x"]
If your attribute has spaces in the name then replace these with hyphens in the shortcode, if you have other characters in your attribute name see the related FAQ below.
There are various other shortcode attributes which can be used, if these are omitted the defaults are used, the available shortcode attributes are:
archive_links – 1 to enable archive links e.g. /brand/sega/, 0 to disable e.g. /shop/?filter_brand=sega, default is 0
categorize – first_character to categorize the terms list by first character, default is empty
current_attribute_link – 1 to still display a link if the current page, 0 to disable, default is 1
hide_empty – 1 to hide empty terms, 0 to disable, default is 1
links_target – Use a HTML link target e.g. _blank to open links in a new window, default is empty
min_price – Use a minimum price number for links to include a minimum price filter, requires archive_links="0", default is empty
max_price – Use a maximum price number for links to include a maximum price filter, requires archive_links="0", default is empty
order – asc or desc, default is asc
orderby – Any orderby parameter, default is name
show_counts – 1 to enable display of term counts, 0 to disable, default is 0
show_descriptions – 1 to enable display of term descriptions, 0 to disable, default is 0
Example shortcode using multiple shortcode attributes:
[wcpas_product_attributes attribute="brand" archive_links="0" categorize="first_character" current_attribute_link="0" hide_empty="0" links_target="_blank" min_price="50.00" max_price="500.00" order="desc" orderby="id" show_counts="1" show_descriptions="1"]
