Below, you’ll find a detailed guide on how to add the Product Table by WBW Shortcode to your WordPress website, including its parameters, examples, and PHP function code. Additionally, we’ll assist you with common issues that might cause the Product Table by WBW Plugin shortcode not to show or not to work correctly.
Before starting, here is an overview of the Product Table by WBW Plugin and the shortcodes it provides:
"Product Table by WBW is a WordPress plugin designed to enhance your WooCommerce store. It allows you to display your products in a responsive and sortable table for a user-friendly shopping experience."
- [WTBP_SHORTCODE]
Product Table by WBW [WTBP_SHORTCODE] Shortcode
The Woo-Product-Tables plugin shortcode is designed to render views based on given parameters. It essentially transforms the provided data into HTML format, enabling seamless page rendering.
Shortcode: [WTBP_SHORTCODE]
Examples and Usage
Basic example – A simple usage of the shortcode to render a table with a specific ID.
[WTBP_SHORTCODE id="1"]
Advanced examples
1. Using the shortcode to render a table by referencing both ID and a specific column. The table will first try to load by ID, but if not found, it will try to load by column name.
[WTBP_SHORTCODE id="1" column="price"]
2. Using the shortcode to render a table by referencing ID, column, and adding a specific class to the table for custom styling.
[WTBP_SHORTCODE id="1" column="price" class="myCustomClass"]
3. Using the shortcode to render a table by referencing ID and displaying it in a specific language (for multilingual sites).
[WTBP_SHORTCODE id="1" lang="es"]
PHP Function Code
In case you have difficulties debugging what causing issues with [WTBP_SHORTCODE]
shortcode, check below the related PHP functions code.
Shortcode line:
add_shortcode(WTBP_SHORTCODE, array($this, 'render'));
Shortcode PHP function:
function render( $params ) {
return $this->getView()->renderHtml($params);
}
Code file location:
woo-product-tables/woo-product-tables/modules/wootablepress/mod.php
Conclusion
Now that you’ve learned how to embed the Product Table by WBW Plugin shortcode, understood the parameters, and seen code examples, it’s easy to use and debug any issue that might cause it to ‘not work’. If you still have difficulties with it, don’t hesitate to leave a comment below.
Leave a Reply