Learn how to set up, customize, and expand the functionality of your WooCommerce products with our library of documentation and tutorials.
  1. Documentation /
  2. Code Snippets /
  3. Theming Snippets

Theming Snippets


Documents

  • Query whether WooCommerce is activated

    If you’re building a theme which supports but doesn’t require WooCommerce, you may want to wrap WooCommerce functionality (think cart links etc) inside a conditional query. That way, if WooCommerce isn’t activated, the functionality is simply ignored instead of producing fatal errors.

  • Sample products loop

  • Show cart contents / total

    Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent theme’s functions.php file, as this will be wiped entirely when you update the theme. To display the cart contents and total […]

  • Show product categories in WooFramework breadcrumbs

    Add this code to your child theme’s functions.php file or via a plugin that allows custom functions to be added, such as the Code snippets plugin. Avoid adding custom code directly to your parent theme’s functions.php file, as this will be wiped entirely when you update the theme.

  • Display Category Image on Category Archive