Today I will talk about
This is a step-by-step tutorial on how you can add Custom Fields In WooComerce Product Table and show extra product data.
What is custom fields?
The fields you use on your site, such as product title, price, ratings, and date, are called metadata. Those fields are given as defaults on the WooCommerce site.
But, if you want to add a field, say, brand, for your products, that field is not available on WooCommerce. To do this, you need to add an extra field by using the Custom Fields creator.
The uses of Custom Fields are so much to describe in a word. Let’s have a look at how you can use Custom Fields In WooComerce Product Table.
- Also add an email address.
- To add Maps
- To show extra info like author or Class for a product
- Product image/description/price etc.
How to add Custom Fields?
Add and configure your Custom Fields following the five easy steps.
Step 1: Installation and Activate Custom Fields
In this guide, we’ve used the Advanced Custom Fields plugin with the Woo Product Table pro plugin.
To add a Custom Fields in your WooCommerce site log in your site. From Dashboard navigate to the plugin. On the top-left of the screen, click on “Add New.” Then in the search option, type acf. You will see some plugins. Try the Advanced Custom Fields among them.
You can install and active it from Dashboard->Plugins->Installed Plugins->Advanced Custom Field and then active it.
Step 2: Add Field Group
Navigate to Dashboard ->Custom Field->Add New
From the top of the screen, input your Field Group Title in Add New Field Group. Here I’ve input Brand Name. Input yourself what you want.
Step 3: Configure Field details
Click on the “add” field right-left on the screen.
After that, select your Field Label from Field level option. Here I’ve given Brand as Field Level. Here, Field Name will be taken automatically.
Select Field Type. Here are a lot of options. You can set Text/Number/Email/Message/Checkbox and some other options. So choose what you want to add as a custom field.
Here I’ve selected Text as my Brand name is a text.
Step 4: Configure Location
The good news is that you can add Custom field anywhere, like post/page/template. To select the functionality, go to Location.
I want to add a custom field as a post in our product. So I’ve selected Post Type in “Show this field group if”.
Also select the field “is equal to product” for product.
Step 5: Publish Page
Must click on the “Publish” button at the top of the page.
So I’ve created an Advanced Custom Field option for Product.
Before, I’ve said that custom fields can be added anywhere. In this guide, I’ve used this custom field in a WooCommerce Product Table.
If you want to know about the plugin, have a look at my previous post about Woo Product Table Pro.
Before showing a custom fields in Product Table let’s look at how the table is.
There I want to add an extra column for Brand. I mean, I’ll add a column that will show products of different brand.
How to show Custom Fields?
In three steps, you can show the created Custom Fields In WooComerce Product Table.
Step 1: Add Brand name Value to Product
To show Custom Fields In WooComerce Product Table navigate to Dashboard->Products->All Products
And also ,Click on the products to edit them. Just up to the bottom of the screen, there you will get a Brand Name option. Select your brand name in the text box named “Value.” I put this Polo on here for a T-shirt.
Finally, Publish the product page.
Step 2: Configure the Shortcode
Now go to your existing shortcode or add a new shortcode for Woo Product Table pro (Dashboard->Product Table->Add New Shortcode) and configure the shortcode. Copy the shortcode and paste it on the page/post where you want to show the custom fields.
You can follow my previous post WooCommerce Product Table : Boost Your Sale to know in detail how to know about configuring shortcode.
Now, in the shortcode configuration panel at the bottom, you will see a option to set up your custom field. Then you need to put in the keyword of your shortcode, like “brand” . Also fill up the column title field. You can follow the screenshot attached below.
Here I’ve given a brand name, as I selected Field Name to brand before.
Note: Always select small letters for this sector.
Now type “Brand” in the column title field. It will show up as a column title for that custom field.
After all the setup, click the button named “Add As Column”. Then it will add a column to the shortcode. just like the below screenshot:
Now it is OK to go next. Click on the “Publish” or “Update” button.
Woo Product Table Pro
The Most Popular Product Table Plugin For WooCommerce
Step 3: Publish/Update the Page
Then update the page and, from the top of the page, click on “view page.”
Then there will be an additional column for Brand. And this is what the Product table may look like after adding the custom field:
So here an extra column has appeared, named “Brand.”
Though using Custom Fields In WooComerce is a tedious task to do for a beginner, anyone can do it following the above steps. I hope you’ve gotten it using Custom Field. If you have a more specific question, please leave a comment below. Thanks a lot.