Skip to content

ssentic/custom-section-single-product

Repository files navigation

Add custom section to single product page

Product pages usually include default sections - product summary, tabs with detailed information about product and related products. But what if you also need to include custom section, displaying for example featured products? Here's a solution.

Usage: add the snippet from custom-section-single-product.php to your child theme's functions.php file.

Please let me know if the snippet still works. Also, any comments or improvements are always welcomed.

Display section based on the selected language

In some cases, you may want to display your custom section only when certain language is selected. Here's a solution.

Snippet can also be simply modified to check different condition.

Usage: add the snippet from conditional-custom-section-single-product.php to your child theme's functions.php file.

Please let me know if the snippet still works. Also, any comments or improvements are always welcomed.