2021 Q4 Sale BFCM – Free Users Sitewide Banner

  1. Documentation
  2. Codex
  3. Snippets
  4. Theming Snippets

Theming Snippets

Articles

  • 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. This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears […]

  • Add checkout validation styles to a third party or custom theme

    You need to add this CSS to your child theme’s style.css file or to your customizers’ “Additional CSS” section. Please don’t add custom code directly to your parent theme’s style.css file as this will be wiped entirely when you update the theme. This file contains bidirectional Unicode text that may be interpreted or compiled differently […]

  • 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. This file contains bidirectional Unicode text that […]

  • Change add to cart button text

    Along with using custom code, it is possible to change the “add to cart” button labels on all single product pages and also on archive/shop page using a plugin: Add to Cart Button Custom Text WooCommerce Custom Add To Cart Button

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

  • 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 to your parent theme’s functions.php file as this will be wiped entirely when you update the theme. This file contains bidirectional Unicode text that may […]

  • 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. This file contains […]

  • 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. This file contains bidirectional […]

  • Sample products loop

    This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters Show hidden characters <ul class="products"> <?php $args = array( 'post_type' => 'product', 'posts_per_page' => 12 ); $loop = new […]

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

WooCommerce - the most customizable eCommerce platform for building your online business.

  • 30 day money back guarantee
  • Support teams across the world
  • Safe & Secure online payment