Woodmart Theme Tag-Based Collection Carousel WordPress Function
What it does?
-
Detects collection tag: Reads the first tag on the current product and treats it as the collection key.
-
Queries related products: Pulls up to 8 other products with that tag and sorts them into a compact carousel.
-
Matches your theme: Uses Woodmart’s Elementor template (if present) or the Woodmart products shortcode, inheriting columns, spacing, borders, shadows, and quantity settings from theme options.
-
Clear call-to-action: Renders a centered button (“View all products from … collection”) linking to the tag archive page.
-
Safe output & cleanup: Buffers HTML, resets queries, and avoids output if no matching products exist.
Why it’s useful?
-
Effortless cross-sell: Promotes complementary items without manual curation—great for “collection” merchandising.
-
Better discovery: Shoppers can browse the whole tag collection with one click, improving session depth and AOV.
-
Design consistency: Leverages your Woodmart settings so the carousel looks native across devices.
-
Low maintenance: Tag once; the carousel updates itself as your catalog changes.
