Hello!
I have added a new select field: https://prnt.sc/19hbwmi
I would like the “Choices” to be all the other products on the site (I use Woocommerce), how do I do this?
Thanks 🙂
Thanks for your answer!
Is it possible with this type to have a value + a label ?
I want to use the value as the product link and the label as the product name, like that : https://prnt.sc/1a7y5ju
No, those other types of fields will only choose other posts on the same WP site, not links to external sites. The products would need to be posts on your site. When you said “all the products on the site” I assumed you were talking about WC products.
But using these fields you could then get whatever values exists for the “Product” post, so you could display anything about that product that you chose.
Yeah of course, that’s for the product of my website.
Maybe the screenshot confused you.
I want that the data is an array with a value + a label.
The value is the product link, and the label is the product name.
For example :
https://my-website.com/product/test1 : Test product 1
https://my-website.com/product/test2 : Test product 2
the fields return posts. Maybe you should look at the documentation for these fields.
Relationship Field
Post Object Field