- This topic has 3 replies, 3 voices, and was last updated 5 years ago by
Steve.
-
AuthorPosts
-
-
January 13, 2017 at 9:52 am #7717
levipeParticipantHi,
I’m in the wine trade.
I use WooCommerce.Products are wines.
I created 3 content types
– grape
– region
– estateI want to link products to content type posts
This is the code:
<?php /* Title: My custom fields Post Type: product */ piklist('field', array( 'type' => 'post-relate', 'scope' => 'estate', 'template' => 'field' )); piklist('field', array( 'type' => 'post-relate', 'scope' => 'grape', 'template' => 'field' )); piklist('field', array( 'type' => 'post-relate', 'scope' => 'region', 'template' => 'field' ));Settings are not saved.
Then I started to dabble.Found out that the last relation-field is saved.
1 field: no problem
2 fields, second field will be saved (not the first)
3 fields, third field is saved (not the 2 first)Probably something in the field description, though the checkboxes with the posts in scope show up all right.
So, what do I have to do?
Thanks,
Charles
-
January 13, 2017 at 11:33 am #7719
DanParticipantHi Charles,
Not really a solution, but could you perhaps do the following:
– Grapes – as tags to account for grape blends etc. allows multiple grape types to be selected.
– Link the product to the estate.
– Link the estate to the region.Dan
-
January 13, 2017 at 6:00 pm #7720
levipeParticipantWell,
found out what happened.
Results get saved only if there is more than one custom post in the custom post typeExample:
if I’d have only one grape (eg Pinot Noir) in the grape post type, then the relation won’t save.
If I have more than one, then the save is performed.I guess this might be one for the bug list
Charles
-
January 17, 2017 at 5:40 pm #7731
-
-
AuthorPosts
- You must be logged in to reply to this topic.