Website Building » WooCommerce » How Do I Create a Size Chart in WooCommerce?

How Do I Create a Size Chart in WooCommerce?

Last updated on December 23, 2022 @ 8:21 pm

Size charts are a great way to help your customers choose the right size product when shopping online. WooCommerce does not have a built-in size chart feature, but there are a few ways you can add one to your store.

One way to add a size chart to your WooCommerce store is to use the WooCommerce Product Size Charts plugin. This plugin allows you to create global size charts that can be applied to all products, or you can create individual size charts for specific products. Once the plugin is installed and activated, you will find a new Size Charts menu item under WooCommerce in your WordPress admin area. From here you can create your size charts.

If you don’t want to use a plugin, another option is to add a size chart to your product pages using HTML and CSS. This approach requires a bit more code, but it’s not difficult to do. First, you will need to create an HTML file for your size chart. This can be done in any text editor, such as Notepad or TextEdit.

Once you have created your HTML file, you will need to upload it to your server. You can do this using an FTP client or your hosting control panel.

PRO TIP: When creating a size chart in WooCommerce, be sure to include all relevant sizing information including measurements in inches or cm, and whether the chart is for men, women, or children. Also be sure to indicate which size corresponds to which measurement, as this can be confusing for customers. failure to do so could result in customers ordering the wrong size product and being dissatisfied with their purchase.

Once your HTML file is uploaded, you need to edit the product page template in your theme. This will vary depending on which theme you are using, but the file you need to edit is typically called single-product.php. Once you have located this file, you will need to add the following code where you want the size chart to appear:

<?php
$size_chart = get_template_directory_uri() . '/size-chart.html';
echo '<a href="'. $size_chart .'" class="size-chart">View Size Chart</a>';
?>

Replace size-chart.html with the name of your HTML file. Save your changes and upload the updated file to your server.

The final step is to add some CSS styles to make the link look nice on your product pages. You can do this by adding the following CSS code to your theme’s stylesheet (style.css) or through the WordPress Customizer:

.size-chart {
display: inline-block;
padding: 6px 12px;
margin-top: 10px;
font-size: 14px;
line-height: 1.42857143;
text-align: center->
white-space: nowrap;  
border: 1px solid transparent; 
border-radius: 4px;} 
.size-chart:hover { 
color:#333;}
Kathy McFarland

Kathy McFarland

Devops woman in trade, tech explorer and problem navigator.