首页 > 解决方案 > 在woocommerce表单内的下拉列表中显示所有产品

问题描述

我是 wordpress 和 woocommerce 的新手,如何在表单内的下拉列表中列出网上商店中的所有产品?我正在为 Contact Form 7 插件使用联系表格 7 和智能网格布局设计,但无法弄清楚。

这是我用于动态下拉列表的代码。我刚刚为“帖子来源”选择了所有产品类别,但列表中没有产品:

[dynamic_select* dropdown-product-list id:dropdownProductList 
"source:post:product" "taxonomy:product_cat:nekategorizirane" 
"taxonomy:product_cat:dom" "taxonomy:product_cat:elektronika" 
"taxonomy:product_cat:fitness" "taxonomy:product_cat:dodaci-prehrani" 
"taxonomy:product_cat:fitness-pomagala-i-sprave" 
"taxonomy:product_cat:kutak-za-klince" "taxonomy:product_cat:igracke" 
"taxonomy:product_cat:ljubimci" "taxonomy:product_cat:lov-i-ribolov" 
"taxonomy:product_cat:muskarci" "taxonomy:product_cat:libido" 
"taxonomy:product_cat:ljepota-i-njega" "taxonomy:product_cat:zdravlje" 
"taxonomy:product_cat:pokloni" "taxonomy:product_cat:poslovni-pokloni" 
"taxonomy:product_cat:program-za-mrsavljenje" 
"taxonomy:product_cat:zene" "taxonomy:product_cat:ljepota-i-njega-zene" 
"taxonomy:product_cat:odjeca" "taxonomy:product_cat:zdravlje-zene"]

标签: wordpresswoocommercedrop-down-menudropdowncontact-form-7

解决方案


如果您的网上商店中有一些产品,那么您可以为每个产品创建页面并根据您的选择命名它们。现在,创建一个下拉菜单并选择所有页面(其中包含产品)。


推荐阅读