Website Building » WooCommerce » How Do I Customize My WooCommerce Product Archive Page?

How Do I Customize My WooCommerce Product Archive Page?

Last updated on January 12, 2023 @ 11:42 am

If you’re running a WooCommerce store, you might want to customize the way your product archive pages look. By default, WooCommerce uses a simple, grid-based layout for these pages. But with a few tweaks, you can make your product archive pages look however you want.

To customize your WooCommerce product archive pages, you’ll need to edit the archive-product.php template file. This template file controls the layout of all product archive pages on your site. You can find this file by going to Appearance > Editor from the WordPress admin panel.

Once you’ve found the archive-product.php template file, you can start making changes to it. For example, let’s say you want to change the number of products that are displayed on each page.

By default, WooCommerce displays 12 products per page. But you can change this by finding the following line of code in the template file:

$args = array( 'post_type' => 'product', 'posts_per_page' => 12 );

You can change the number 12 to any number you want to change the number of products displayed per page. For example, if you want to display 24 products per page, you would change the code to:

$args = array( 'post_type' => 'product', 'posts_per_page' => 24 );

It’s important to note that you should make a backup copy of the template file before making any changes, in case you need to revert back to the original. Additionally, it’s a good practice to use a child theme for customization, so that your customizations won’t be overwritten when you update the WooCommerce plugin.

PRO TIP: Please be aware that the WooCommerce Product Archive Page is not intended to be customized. Any changes you make to this page may adversely affect your WooCommerce shop.

Conclusion

In conclusion, if you want to customize your WooCommerce product archive pages, you’ll need to edit the archive-product.php template file. You can find this file by going to Appearance > Editor from the WordPress admin panel. Once you’ve found the archive-product.php template file, you can start making changes to it.

Drew Clemente

Drew Clemente

Devops & Sysadmin engineer. I basically build infrastructure online.