Forum Replies Created
-
AuthorPosts
-
November 30, 2015 at 4:40 pm in reply to: How to display add more field in oder detail page of woocommerce #5166
SteveKeymasterTwo things you will need to update:
FORM:
Your scope should be post_meta, because that’s where the data is being saved.
,'scope' => 'post_meta'You will need to include a hidden field to tell Piklist which CPT to save against:
piklist('field', array( 'type' => 'hidden' ,'scope' => 'post' ,'field' => 'post_type' ,'value' => 'shop_order' ));You can see a sample of this in:
plugins/piklist/add-ons/piklist-demos/parts/forms/new-post-with-validation.phpDISPLAY THE DATA:
One of the big changes with v0.9.9x is that you no longer need all that code to retrieve you data. You can easily pull it like a standard PHP array and loop through it.Try this:
$upload_orders = get_post_meta($post->ID, 'upload_order_attch', false); foreach ($upload_orders as $upload_order => $value) { echo $value; }Let us know if that works for you.
SteveKeymasterHa! Closing ticket.
SteveKeymaster@dougsandlin– In most cases you can use standard WordPress functions to retrieve and manipulate your data with Piklist. One of the goals Kevin and I had when creating Piklist, was not to force users to learn a bunch of new functions.
You can use
get_option()with Piklist just like you would use it with any other option.Glad you figured it out.
Closing ticket.
SteveKeymaster@azizultex– Can you post your field code, please?
SteveKeymasterGreat. Closing ticket.
SteveKeymaster@spsenthilraja– Welcome to the Piklist community!
Congratulations, you’ve found a bug with the front-end forms. We’ll get it fixed in the next version of Piklist.
SteveKeymasterIt’s under the standard WordPress settings
SteveKeymaster@anthonyabraira– I split your question off to a separate topic since it had nothing to do with the original one. Please try to keep each reply relevant with the original topic.
Piklist uses the standard WordPress function
get_poststo retrieve related posts. You can learn more here.
SteveKeymasterCan you post the field code for ‘sponsor’?
SteveKeymaster@bubdev- the demos are supposed to modify the media screen. They also modify the user profile pages.
SteveKeymaster@dougsandlin Where do you want to show/use this setting?
get_option is a WordPress function not a Piklist function.
If the setting will control something in your then, then the code will probably go there.
Let us know what you want your setting to do?
SteveKeymasterFixed in the next version of Piklist
SteveKeymasterThis is fixed in the next version of Piklist
SteveKeymasterThe file field gets the image dimensions from
wp_get_attachment_image_src. You may want to check what’s being passed here.
SteveKeymasterIn SETTINGS > MEDIA, what dimensions are set for the Thumbnail size?
If empty, please set to 150 and see if that helps.
-
AuthorPosts