Theming Snippets

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 […]

Change add to cart button text

Code Snippet Add 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 […]

Change the placeholder image

The placeholder image can now be set at: WooCommerce > Settings > Products as of version 3.5x. More info at: Configuring WooCommerce Settings. WooCommerce 3.4x or earlier Add code to […]

Change number of upsells output

Add 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 […]

Change number of related products output

Add 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 […]

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 […]

Loading…

Something went wrong. Please refresh the page and/or try again.