View Categories

Troubleshooting Shortcodes and Content in Product Tabs

Fix shortcode and content problems in product tabs #

If a shortcode in Additional Custom Product Tabs for WooCommerce outputs nothing or shows raw text, the usual cause is a typo in the shortcode name or a missing attribute, such as name or key. If tab content collapses into one block, enable HTML paragraph tags in WPFactory > Product Tabs > General > Advanced Options.

A shortcode outputs nothing or shows raw text #

Product Tabs provides three shortcodes: [alg_wc_pt_product_function], [alg_wc_pt_product_meta] and [alg_wc_pt_translate]. If one is not working:

  • Check the spelling of the shortcode name and its attributes against the product tabs shortcodes reference.
  • [alg_wc_pt_product_function] needs a name attribute, and by default calls a method on the product object, for example [alg_wc_pt_product_function name="get_sku"]. If the value is empty for that product, the shortcode outputs nothing unless you set an on_empty attribute.
  • [alg_wc_pt_product_meta] needs a key attribute matching an existing custom field, for example [alg_wc_pt_product_meta key="my_custom_field"].
  • Raw shortcode text on the page usually means a typo in the tag, or a page builder that is escaping the content.

Tab content is not breaking into paragraphs #

Custom tab content is output as you enter it. If line breaks are collapsing, enable HTML paragraph tags in WPFactory > Product Tabs > General > Advanced Options. This wraps double line breaks in <p> tags. Alternatively, add your own HTML markup in the content field.

Styling the tab or its content #

Product Tabs does not include visual styling controls. Tab appearance is controlled by your theme, and you style tab content with your own HTML and CSS inside the Content field. If a tab looks wrong, check for theme CSS or custom CSS that targets the WooCommerce tabs.

Still stuck? #

If a shortcode or tab still will not work, reach out through the WPFactory support page with the exact shortcode or content you are using and we will take a look.

 

Custom Product Tabs for WooCommerce