Using the ACF (Advanced Custom Fields) plugin can add custom fields such as video, QA fields, etc. to WooCommerce product categories and products. Combined with Elementor Pro's template feature, advanced product listing pages and product detail pages can be created. Below are the detailed step-by-step and example tutorials:
Add custom fields to product detail pages
Step 1: Install the ACF plugin
- Log in to your Wordpress dashboard and navigate toplug-in (software component)In the search bar, type "Advanced Custom Fields".
![图片[1]-使用ACF插件和Elementor Pro为WooCommerce产品添加自定义字段,实现高级产品详情页设计-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024072002554887.png)
- Install and enable the ACF (Advanced Custom Fields) plug-in.
Step 2: Add Fields
- Go to "field"menu, click "newly built".
![图片[2]-使用ACF插件和Elementor Pro为WooCommerce产品添加自定义字段,实现高级产品详情页设计-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024072003002988.png)
- Add a field group name, such as "offerings".
- Set the location to "Content type equals product", so that the field is added to all product pages.
- Click "Adding Fields".
Step 3: Setting up the fields
- Enter a field label, such as "QA". The field name will be automatically generated based on the field label, and English is recommended.
- Select the field type as "Visualization Editor" and save.
![图片[3]-使用ACF插件和Elementor Pro为WooCommerce产品添加自定义字段,实现高级产品详情页设计-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024072003042459.png)
Example: How to add custom fields to product details and product list with ACF
Go to the product list, edit any product and a new QA field will be added at the bottom of the page. To populate the content, you can use the same method to add other fields such as BROCHURE, WHY CHOOSE US and so on.
Step 4: Create a product detail page template with Elementor Pro
- Create a completed single product template (product detail page template).
- Edit the product detail page template with Elementor.
- Add a text editor element below the heading.
- Click on the dynamic tag and select "ACF Field".
![图片[4]-使用ACF插件和Elementor Pro为WooCommerce产品添加自定义字段,实现高级产品详情页设计-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/07/2024072003082856.png)
- In the key, select the field "QA" that you just added.
caveat If the product to which the QA field has just been added is not the current previewed product, you need to set the previewed product by clicking on the gear in the lower left corner and clicking on "Apply & Preview" button to see the QA field contents.
Add custom fields to product listing pages
Step 1: Add video fields to product categories with ACF
- Add as aboveACF Video FieldsThe
- When you add a product category, you will see the video field.
Step 2: Create Product archive template page with Elementor Pro
- Adds a video element to the template.
- Set the video element's link to "ACF Field" and select the ACF video field you just added.
caveat
Enter a video link when editing product category information, and the corresponding video will be displayed when viewing the product category page.
![图片[5]-使用ACF插件和Elementor Pro为WooCommerce产品添加自定义字段,实现高级产品详情页设计-光子波动网 | 专业WordPress修复服务,全球范围,快速响应](https://www.361sale.com/wp-content/uploads/2024/06/2024062702034823.png)
With the above steps, you can use ACF and Elementor Pro to flexibly add custom fields to WooCommerce products to create personalized product detail pages and product listing pages.
Link to this article:https://www.361sale.com/en/14236The article is copyrighted and must be reproduced with attribution.
No comments