Woo Developer Blog
The commerce platform for developers
Recent posts
-
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 to your parent theme’s functions.php file as this will be wiped entirely when you update the theme. Please note that it does not work for […]
-
Hide loop read more buttons for out of stock items
•
You need to 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. Please don’t add custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme. https://gist.github.com/woogists/42265d45b6aa2b7774dd0c6a9c3aa641
-
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 […]
-
Display My Account link in a template file
•
Displays a link to the user account section. If the user is not logged in the link will display ‘Login / Register’ and take the use to the login / signup page. If the user is logged in the link will display ‘My account’ and take them directly to their account. https://gist.github.com/woogists/f552b765d9d447dea43be9e9eb07490b
-
Exclude products from a particular category on the shop page
•
As ‘clothing’ is an example in the snippet below, be sure to use a product category slug that exists in your WooCommerce store. Note that this will only work when you have your “Shop Page Display” option set to ‘Show Products’ under your Customizers’ WooCommerce > Product catalog settings. You need to add this code […]
-
Add a custom currency / symbol
•
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. Please don’t add custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme. https://gist.github.com/woogists/72947b71e48a62f15f5548283d4ed00f
-
Disable the default stylesheet
•
You need to 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. Please don’t add custom code directly to your parent theme’s functions.php file as this will be wiped entirely when you update the theme. Disable all stylesheets WooCommerce […]
-
Change number of products per row
•
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 parent theme’s functions.php file as this will be wiped entirely when you update the theme. Defines where ‘first’ and ‘last’ classes are applied […]
-
Change number of products displayed per page
•
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 parent theme’s functions.php file as this will be wiped entirely when you update the theme. Use the following code to change the number […]
-
Custom sorting options (asc/desc)
•
A snippet to add new sorting options to the catalog.