How can I use ACF Pro to add custom tabs to WooCommerce products?

Advanced Custom Fields Pro is a plugin that allows you to do a number of things. However, in this tutorial, we’re going to walk you through how to add custom tabs to WooCommerce products.

Please note that this tutorial is a bit of a developer tutorial. You will be adding some code to your theme’s functions.php file and adding another php file to your theme. You also need to make sure that you have the Advanced Custom Fields Pro plugin installed and activated on your site.

The first thing you need to do is create a new file in your theme’s folder. We’ll call it acf-fields.php. We’ll add the following code to the file.

This code is what creates the ACF repeater fields and thus creates the tabs on your WooCommerce product.

Next, you’ll need to add this code to your theme’s functions.php file. This will set up the tabs in your theme.

With both files being uploaded to your site, you will now have ACF custom tabs on your WooCommerce products.

Be Sociable, Share!

    Author Bio

    About the Author: AJ Morris

    AJ Morris is the Product Manager for Liquid Web’s Managed WordPress/WooCommerce Hosting. He’s been involved in the WordPress community for over a decade focusing on building, designing and launching WordPress websites and businesses.

    Here's 75 % off, Launch a New VPS Today. Find out why 30,000 customers have chosen our Best-in-Class Performance & 24x7 Heroic Support