WooCommerce vs Drupal Commerce: Which Is Best for Your Online Store?
Building an online store? The platform you choose now will shape your business for years. WooCommerce and Drupal Commerce both...
Your WooCommerce should look better than a generic theme. If your online shop looks like everyone else’s, you’re leaving money and brand identity on the table. A custom theme gives you complete control – over how products display, how customers checkout, and how your entire store feels.
In this post, we’ll break down everything you need to create a WooCommerce theme that actually works for your business. You’ll learn the essential structure of WooCommerce themes and how to customize key pages.
Plus, we’ll cover the best practices followed by WordPress development agencies for customizing theme. So, lets begin with understanding the importance of creating a custom theme for your WooCommerce site.
Think about walking into a store where everything feels generic—the same shelves, same layout as every other shop. That’s what happens when you use a pre-made WooCommerce theme. Here are some of the reasons why creating a custom theme for WooCommerce is important.
A custom WooCommerce theme isn’t just about looks. It’s about control, performance, and creating a store that truly fits your brand. If you want a site that works exactly how you need it, get it customized by our WordPress website development company.
Building a custom WooCommerce theme is exciting, but you need the right foundation. Skipping the basics can lead to frustration. Let’s make sure you’re set up for success.
If you have these covered, you’re ready to start. Missing a skill? No worries—pick one, practice, then jump in. Every expert started where you are now.
Think of your WooCommerce theme like a house blueprint. If you don’t know where the rooms (templates) are or how they connect, you’ll get lost fast. Let’s break it down simply.
At its core, a WooCommerce theme is a WordPress theme with special templates for products, cart, and checkout. If you know WordPress themes, you’re halfway there.
The templates are stored in your theme’s /woocommerce/ folder (or WooCommerce plugin):
There are more .php files, but for now, these are the important ones you should know about.
WooCommerce checks for files in this order:
This means you can override just what you need.
WooCommerce uses “hooks” like:
These hooks let you add/remove elements without touching template files.
Some parts (like headers) appear everywhere. Others (like “Add to Cart” buttons) only show where needed. Knowing this helps you edit efficiently.
Now you see how the pieces fit: templates control layouts, hooks handle functionality, and the hierarchy decides what gets used. It’s not random – there’s a clear system. You don’t need to memorize it all. Just remember where to look when you need to change something. Keep this mental map handy as we go further.
We have discussed the importance and structure of the theme in the previous section along with prerequisites. Now, let’s learn how to create a custom theme for WooCommerce.
Because you wouldn’t build a house without tools—same goes for your WooCommerce theme.
1. Pick Your Local Server Tool
2. Install WordPress Locally
3. Get WooCommerce Running
4. Add Fake Products (Trust Me, You’ll Need These)
Now you’ve got a safe space to break things (and fix them). Let’s move to Step 2 when once you are done with setup.
A child theme allows you to safely customize your WooCommerce theme without affecting the parent theme. Here’s how to create one:
1. Make a New Folder
Go to /wp-content/themes/ and create a folder named like mytheme-child (keep it simple).
2. Create the Must-Have style.css File
Inside your new folder, make a style.css file. Paste this at the top:
/*
Theme Name: MyTheme Child
Template: parent-theme-folder-name
*/
Replace parent-theme-folder-name with the actual folder name of your parent theme (check /themes/ if unsure).
3. Set Up functions.php (The Magic Connector)
Create a functions.php file in the same folder and add this to load the parent theme’s styles:
<?php
add_action('wp_enqueue_scripts', function() {
wp_enqueue_style('parent-style', get_template_directory_uri() . '/style.css');
});
4. Activate the Child Theme
Now you’ve got a safe space to customize. Next, we’ll make WooCommerce customize your theme.
This is where you take control—change what you want, keep what works.
1. Find the Right Template
Look in: /wp-content/plugins/woocommerce/templates/. Common ones to tweak are:
2. Copy It the Smart Way
3. Edit Without Breaking Things
4. Use Hooks
Some changes don’t need template edits—use hooks instead. For example remove remove the SKU with:
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40);
Tip: Always copy only the templates you need to modify—don’t copy the entire WooCommerce folder.
To style your theme and add interactive features, you’ll need to include custom CSS and JavaScript.
1. Set Up Your Files
In your child theme, create:
2. Connect Them Properly
Open your functions.php and add this code (just copy-paste):
function my_theme_assets() {
// Load your CSS
wp_enqueue_style('my-custom-css', get_stylesheet_directory_uri() . '/css/custom-style.css');
// Load your JS (jQuery included)
wp_enqueue_script('my-custom-js', get_stylesheet_directory_uri() . '/js/custom-script.js', array('jquery'), '1.0', true);
}
add_action('wp_enqueue_scripts', 'my_theme_assets');
3. Start Styling (CSS Tips)
Target WooCommerce classes like:
.woocommerce ul.products li.product {
background: #f8f8f8;
border-radius: 8px;
}
Use Chrome DevTools (F12) to find elements quickly.
4. Add Smart JavaScript
Need AJAX cart updates? Start with:
jQuery(document).ready(function($) {
// Your interactive code here
$('.add_to_cart_button').on('click', function() {
console.log('Product added!'); // Test if it works
});
});
Now your theme not only works well—it looks and feels premium. Next we’ll test the theme we customized.
Because even small mistakes can turn customers away—let’s catch them before they do.
1. Check the Basics First
2. Test on Different Screens
3. Look for Visual Glitches
4. Speed Matters
Now you’ve got a theme that works everywhere and we are ready to go live.
Time to take your masterpiece live—let’s do this without panic.
1. Backup Everything First
2. Upload Like a Pro
3. The Safe Switch
4. Check Critical Functions
Your store with custom theme is now open for business!
With that we have learned how to create a custom theme for WooCommerce website. Now let’s learn how you can customize WooCommerce pages in the next section.
Your WooCommerce pages are where customers browse, decide, and buy. A generic layout won’t cut it—customizing these pages means better shopping experiences, higher conversions, and a store that truly feels like yours. Let’s break down how to optimize the four most important pages.
Your shop page is the first impression customers get. Let’s make it clean, functional, and uniquely yours.
Step 1: First, locate the shop page template. You’ll find it in your theme’s woocommerce folder as archive-product.php. If it’s not there, grab a fresh copy from the WooCommerce plugin templates folder.
Step 2: Want to change how products are laid out? Add this CSS to your stylesheet to create a 3-column grid with nice spacing:
ul.products {
grid-template-columns: repeat(3, 1fr);
gap: 2rem;
}
Step 3: Head to WooCommerce settings to control what shows on product cards. Go to Products → Display in your dashboard to toggle ratings, prices, and set how many products appear per page.
Step 4: Make sorting easier for customers by customizing the options. Drop this in your functions.php to modify the dropdown:
add_filter('woocommerce_catalog_orderby', 'custom_sorting_options');
Step 5: Need a banner at the top of your shop? Use this hook to add one right above the product grid:
add_action('woocommerce_before_main_content', 'add_shop_banner');
Tip: Three columns usually work better than four – products look less cramped and are easier to click on mobile.
The product page is where the magic happens. Let’s optimize it for conversions.
Step 1: Start with single-product.php in your theme’s woocommerce folder. No file there? Copy it from the plugin templates first.
Step 2: Want to move the title below the price? Swap their positions with:
remove_action('woocommerce_single_product_summary', 'woocommerce_template_single_title', 5);
add_action('woocommerce_single_product_summary', 'woocommerce_template_single_title', 15);
Step 3: Make your product gallery shine. Either modify product-image.php or use a plugin like Additional Variation Images for extra functionality.
Step 4: Custom tabs let you organize product info neatly. Add your own tabs with:
add_filter('woocommerce_product_tabs', 'custom_product_tabs');
Step 5: That “Add to Cart” button needs to pop. Try this CSS:
.single_add_to_cart_button {
background: #ff5a5f;
transition: all 0.3s;
}
Watch Out: However you design it, keep the price visible and prominent – it’s what customers look for first.
These pages make or break your sales. Let’s smooth out their presentation.
Step 1: Always work with copies of cart.php and checkout.php in your theme folder. Never edit the original plugin files.
Step 2: Suggest related products in the cart with:
add_action('woocommerce_after_cart_table', 'show_cross_sells');
Step 3: Too many checkout fields scaring customers away? Simplify them:
add_filter('woocommerce_checkout_fields', 'simplify_checkout_fields');
Step 4: Build trust where it matters most. Add payment badges near the order total using review-order.php or a trust badge plugin.
Step 5: Make quantity updates instant with this jQuery snippet:
jQuery('body').on('change', '.qty', function(){
jQuery('[name="update_cart"]').trigger('click');
});
Tip: Show shipping costs early in the process – unexpected fees are the top reason people abandon carts during checkout.
The little details create a premium shopping experience.
Step 1: Clean up your product images with a subtle border:
.woocommerce-product-gallery__image {
border: 1px solid #eee;
}
Step 2: Mobile shoppers will thank you for this responsive tweak:
@media (max-width: 768px) {
.product_title { font-size: 1.5rem; }
}
Step 3: Keep that “Add to Cart” button visible as users scroll:
jQuery(window).scroll(function(){
if (jQuery(window).scrollTop() > 500) {
jQuery('.single_add_to_cart_button').addClass('sticky-cart');
}
});
Step 4: Make sale badges stand out with better positioning:
.onsale {
top: 10px;
left: 10px;
background: #ff5a5f;
}
Step 5: Replace boring stock messages with something more engaging:
add_filter('woocommerce_get_availability_text', 'custom_stock_message');
Tip: No matter how pretty you make it, never sacrifice usability. Buttons need to stay large and tappable, especially on mobile.
Customizing these four pages transforms a basic store into a personalized shopping experience. Start with the shop page to draw customers in, optimize product pages to convince them, and streamline checkout to seal the deal.
Building a WooCommerce theme isn’t just about looks—it’s about creating a fast, secure, and easy-to-use store. Here’s how to do it right.
A great WooCommerce theme balances looks, speed, and usability. Follow these practices, and you’ll avoid most common headaches.
Go to your WordPress dashboard > Appearance > Themes > Add New. Click “Upload Theme,” select your .zip file, and install. Activate it once uploaded. Always use a child theme if customizing—this protects your changes during updates.
Use the [products] shortcode in any page editor to show specific items. For more control, create a custom template in your theme and call do_shortcode(‘[products ids=”1,2,3″]’). Need advanced layouts? Try WooCommerce hooks or page builders like Elementor.
Add add_theme_support(‘woocommerce’) to your theme’s functions.php. Include WooCommerce template files in your theme folder (like single-product.php). Test with WooCommerce’s built-in demo data to catch styling issues early.
Creating a custom theme might seem complex at first, but breaking it down makes all the difference. You now know how the structure works, where to make key changes, and how to style each part of your store—from product pages to checkout. The best part? You don’t need to be an expert to get started.
A well-built custom theme makes shopping smoother for customers and gives your brand a unique edge. Start small—tweak what matters most, test as you go, and refine over time. The more your store reflects your vision, the better it performs. If you ever feel stuck, revisit the basics: keep it simple, focus on usability, and always prioritize speed.
Ready to build a WooCommerce store that truly stands out? Contact us to bring your vision to life.