內容簡介
Simple Pricing Table 創建一個名為 pricing-table 的自定義文章類型,使您可以使用小工具或簡碼創建多個定價表。插件中包含最小的樣式,使其輕巧且易於使用您自己的自定義 CSS 覆蓋。
可用的篩選器
插件的所有 HTML 輸出都可以過濾以覆蓋默認標記。以下是如何更改標題標籤的示例:
add_filter( 'spt_markup_name', 'custom_pricing_table_heading');
/**
* 更改定價表標題。
*/
function custom_pricing_table_heading() {
return '<h5 class="pricing-table__name">%s</h5>';
}
要禁用行內 CSS 輸出,請使用以下篩選器:
add_filter( 'spt_inline_css', '__return_false' );
簡碼用法
以下是 Simple Pricing Table 範例簡碼。可在「編輯定價表」畫面中找到定價表 ID:
[pricing-table id="1234"]
外掛標籤
開發者團隊
原文外掛簡介
Simple Pricing Table creates a new pricing-table custom post type and enables you to create multiple pricing tables with either a widget or a shortcode. There is minimal styling included with the plugin, keeping it lightweight and easy to override with your own custom CSS.
Available Filters
All of the plugins HTML output can be filtered to overwrite the default markup. Here is an example of how to change the heading tag:
add_filter( 'spt_markup_name', 'custom_pricing_table_heading');
/**
* Change Pricing Table heading.
*/
function custom_pricing_table_heading() {
return '
%s
';
}
To disable inline CSS output use the following filter:
add_filter( 'spt_inline_css', '__return_false' );
Shortcode Usage
Here is an example of the Simple Pricing Table shortcode. The pricing table ID can be found from the Edit Pricing Table screen:
[pricing-table id="1234"]
