Skip to Content

Building a Custom WooCommerce Theme: The Basics

Full control over the store's appearance

Pre-built WooCommerce themes work for most, but sometimes you need full control. Maybe the store needs to match an existing brand identity pixel-perfectly, or you have functional requirements no existing theme meets.

Starting point

Don't start from scratch. Underscores (_s) or Starter Theme gives you an empty but functional WordPress theme structure. Add WooCommerce support in functions.php with add_theme_support('woocommerce'). That activates WooCommerce-specific template hooks.

Template hierarchy

WooCommerce looks for templates in your theme under the woocommerce/ folder. Copy a template from wp-content/plugins/woocommerce/templates/ to your-theme/woocommerce/ and customize. Never modify the originals in the plugin folder.

The most important ones: archive-product.php (product list), single-product.php (product page), cart/cart.php (cart), checkout/form-checkout.php (checkout). Start with these four.

Hooks instead of template overrides

WooCommerce has hundreds of hooks (actions and filters) that let you modify output without copying entire templates. woocommerce_before_main_content, woocommerce_after_shop_loop_item, woocommerce_checkout_before_order_review. It's often cleaner and more upgrade-safe.

Styling

WooCommerce loads its own CSS. You can deactivate it with add_filter('woocommerce_enqueue_styles', '__return_empty_array') and write all styling from scratch. Or keep the base styles and override with higher specificity.

Test thoroughly: cart, checkout, my account, order confirmation, empty states (empty cart, no search results). They're often forgotten in custom theme builds.

WooCommerce Upselling and Cross-Selling
Increase order value without being pushy