內容簡介
這個官方的 Generous 外掛可以讓您輕鬆地建立一個商店。
需要 Generous 帳戶。
使用方式
設定
在外掛設定頁面內,指定您的 Generous 使用者名稱、商店的永久連結和儲存設定。
簡碼
從 WordPress 文章或頁面中顯示 Generous 內容。
[generous store] 輸出商店
[generous categories] 輸出類別清單
[generous category=id] 輸出指定類別的投影片
模板
如要修改模板,請在您的主題內建立名為 generous-templates 的資料夾,複製您想要自訂的模板到該資料夾中。
頁面
page-default.php 顯示類別清單和特色類別的投影片
page-category.php 顯示一個指定類別的投影片頁面
page-slider.php 顯示一個個別投影片的頁面
簡碼
shortcode-categories.php [generous categories]
shortcode-category.php [generous category=id]
shortcode-store.php [generous store]
局部
partials/categories-item.php 類別項目(使用者:shortcode-categories.php)
partials/slider-item.php 投影片項目(使用者:page-default.php、page-category.php、shortcode-category.php)
partials/slider.php 單一投影片項目(使用者:page-slider.php)
篩選器
篩選器讓您在模板內輸出所需的資料。
slider-item.php
[slider_id] 投影片的 ID
[title] 標題
[cover_photo] 封面照片
[additional_info] 描述
[suggested_price] 建議價格小數 –(10.00)
[suggested_price_whole] 建議價格整數 –(10)
[minimum_price] 最低價格小數 –(10.00)
[minimum_price_whole] 最低價格整數 –(10)
[currency_symbol] 貨幣符號 –($)
[charity_percentage] 捐款比例
[item_total] 物品總數
[item_total_label] 物品標籤 –(項目或物品)
[short_url] 短網址
[button_slider_overlay] 產生疊加的連結
category-item.php
[title] – 標題
外掛標籤
開發者團隊
原文外掛簡介
The official Generous plugin that allows you to easily generate a store.
Requires a Generous account.
Usage
Settings
Within the plugin settings page, specify your Generous username, the permalink where the store should generate, and save.
Shortcodes
Display Generous content from a WordPress post or page.
[generous store] Outputs a store
[generous categories] Outputs a list of categories
[generous category=id] Outputs slider of the specified category
Templates
To modify the templates, create a folder called generous-templates within your theme, and copy over the templates that you’d like to customize.
Pages
page-default.php Displays a list of categories, and sliders of the featured category
page-category.php A page of sliders of a specified category
page-slider.php A page of an individual slider
Shortcodes
shortcode-categories.php [generous categories]
shortcode-category.php [generous category=id]
shortcode-store.php [generous store]
Partials
partials/categories-item.php The category item (Used by: shortcode-categories.php)
partials/slider-item.php The category item (Used by: page-default.php, page-category.php, shortcode-category.php)
partials/slider.php The single slider item (Used by: page-slider.php)
Filters
Filters allow you to output requested data within your templates.
slider-item.php
[slider_id] The ID of the slider
[title] Title
[cover_photo] Cover photo
[additional_info] Description
[suggested_price] Suggested price decimal – (10.00)
[suggested_price_whole] Suggested price whole – (10)
[minimum_price] Minimum price decimal – (10.00)
[minimum_price_whole] Minimum price whole – (10)
[currency_symbol] Currency symbol – ($)
[charity_percentage] Percentage going to charity
[item_total] Total number of items
[item_total_label] Item label – (Items or Item)
[short_url] Short url
[button_slider_overlay] Link that generates overlay
category-item.php
[title] – Title
