PP Flatsome Helper
Theme and layout changes for the Progressive Parts Flatsome child theme that are too large for functions.php or need to coordinate with other plugins. Single product breadcrumb trail (visible and Rank Math schema), SKU placement, Meta Info table and the 8/4 description tab layout.
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/bennychaos/pp-flatsome-helper/archive/refs/heads/main.zipWordPress/WooCommerce plugin for Progressive Parts. Home for theme and layout changes to the Flatsome child
theme that are too large for functions.php or that have to coordinate with other plugins.
What it does (v1.0.6)
All of it applies to single product pages only.
| Module | File | What |
|---|---|---|
| Breadcrumbs | includes/class-pp-flatsome-helper-breadcrumbs.php |
Builds the trail PARTS > EXHAUST > EXHAUST SYSTEMS, prints it above the H1 and feeds the same trail to Rank Math's BreadcrumbList JSON-LD |
| Product summary | includes/class-pp-flatsome-helper-product-summary.php |
Removes Flatsome's summary breadcrumb and WooCommerce's product meta block; prints the trail (summary priority 2, after the fitment header) and SKU: XXXX directly under the H1 (hooked to woocommerce_after_template_part for single-product/title.php) |
| Product tabs | includes/class-pp-flatsome-helper-product-tabs.php |
8/4 description tab layout (moved from functions.php); one Additional Information table via WooCommerce's row filter: Manufacturer (linked brand category) first, weight with the shipping class in brackets, dimensions and attributes, then SKU and tags |
| Styles | assets/css/single-product.css |
Scoped rules for the three pieces above; Flatsome's .breadcrumbs and WooCommerce's .shop_attributes styling is inherited |
Breadcrumb rules
- Starts with an unlinked Parts label. Top-level product categories (Parts, Brand, Universal) are structural containers, so the label stands in for whichever root the chosen category lives under and roots are never linked.
- Then the category chain (root excluded), each crumb linked to its archive.
- The category is the Rank Math primary category when it is eligible, otherwise the deepest eligible category on the product (ties keep alphabetical order).
- Categories under the Brand tree are never used (
pp_flatsome_helper_breadcrumb_excluded_roots, matched by slug). - The product itself is added to the schema as the final ListItem but is not printed; the H1 sits directly beneath.
- Schema: the trail is returned from
rank_math/frontend/breadcrumb/items, so Rank Math's BreadcrumbList matches the visible nav. The Parts label has no URL and is flaggedhide_in_schema, so it is left out of the JSON-LD (Google requires anitemURL on every entry except the last).
Rank Math settings that must stay as they are: General Settings > Breadcrumbs > Enable breadcrumbs function = ON (it gates the BreadcrumbList schema). Its Home / separator / "hide post title" options no longer affect product pages because the plugin supplies the whole trail. Flatsome's Rank Math > Breadcrumb Customizer toggle can stay on; the plugin removes the theme's summary breadcrumb regardless.
The Additional Information table
One table, shaped entirely through the core woocommerce_display_product_attributes filter (priority 20), so third
parties can adjust rows through the same filter at a later priority:
- Manufacturer: the product's category under the top-level Brand container (matched by slug,
pp_flatsome_helper_brand_root_slug), linked to the brand archive. It replaces thepa_brandglobal attribute, which is being retired; until that attribute is removed or hidden, both rows show. - WooCommerce's own rows: weight with the shipping class in brackets, e.g.
0.35 kg (PP-EP5), then dimensions and visible attributes. A product without a displayed weight does not show its shipping class at all; it is not worth a row of its own. - SKU and Tags last. Categories are left out on purpose: the breadcrumb trail and the Manufacturer row already cover them.
SKU and variations
The SKU line is not a summary-priority hook: Reviews.io registers its rating snippet at summary priority 5 at
plugin include time, which no later registration can precede, so the line is printed from
woocommerce_after_template_part the moment WooCommerce's title template part finishes. Whatever else is queued
at priority 5 now follows the SKU.
The SKU line and the table's SKU cell both use WooCommerce's product_meta / sku classes. WooCommerce's
variation script updates .product_meta .sku when a variation is chosen, so both update live with no script of
our own. Variable products without a parent SKU show N/A until a variation is picked, as WooCommerce's own
meta template does.
Hooks
Filters:
| Filter | Default | Purpose |
|---|---|---|
pp_flatsome_helper_breadcrumb_root_label |
Parts |
Static first crumb ('' removes it) |
pp_flatsome_helper_breadcrumb_excluded_roots |
[ 'brand' ] |
Top-level category slugs whose trees never lead the trail |
pp_flatsome_helper_breadcrumb_term |
chosen WP_Term |
Override the category the trail is built from |
pp_flatsome_helper_breadcrumb_trail |
trail array | Final trail (name, url, visible, schema per crumb) |
pp_flatsome_helper_breadcrumb_separator |
> |
Visible separator |
pp_flatsome_helper_additional_information_heading |
Additional Information |
4-col heading |
pp_flatsome_helper_brand_root_slug |
brand |
Slug of the top-level category whose children are the brands (Manufacturer row) |
Actions kept from the functions.php original (the child theme's data-sheet output uses pp_product_info_col_top):
pp_product_description_col_top, pp_product_description_col_bottom, pp_product_info_col_top, pp_product_info_col_bottom.
Migrated out of functions.php (2026-09-30)
- "RankMath breadcrumb Fix" items filter and the
woocommerce_product_meta_endbreadcrumb hook (source of the brand crumb). display_product_shipping_class()onwoocommerce_product_meta_end(now a Meta Info row).move_rank_math_breadcrumbs()(dead: it tested for a function that is a class method, so it never ran).pp_restructure_description_tab()/pp_description_tab_two_column()(nowPP_Flatsome_Helper_Product_Tabs).
Verifying without a browser
php -l <file> # lint every changed file
wp plugin list | grep pp-flatsome-helper # active + version
See CLAUDE.md for a wp eval that prints the trail for one product. Staging is IP-locked, so the visual check
is a browser test on a product page: trail above the H1, SKU beneath it, Meta Info under the attributes table in
the description tab, and the BreadcrumbList in the page's JSON-LD.