How can I use Advanced Custom Fields 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 tutorials, we are going to walk you through how to add custom tabs to WooCommerce products.

Please note this tutorial does require the use of code, so it’s best for those familiar with writing code, like a developer. 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.

To get started the first thing you are going to need to do is to create a new file in your theme’s folder. We’ll call it acf-fields.php. Then we’ll add the following code to the file.

This code is what creates the ACF repeater fields and in return 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