- This topic has 2 replies, 1 voice, and was last updated 4 years, 4 months ago by
exposuredesign.
Viewing 2 reply threads
-
AuthorPosts
-
-
September 29, 2017 at 10:16 am #8398
exposuredesignMemberHey,
Having an odd problem with a meta box on a custom page template. For some reason the data will add once but will not update at all.
<?php /* Title: Homepage Notice Post Type: page Template: page-home Order: 5 */ piklist('field', array( 'type' => 'radio', 'field' => 'notice_option', 'label' => 'Would you like to add a notice?', 'choices' => array( 'no' => 'No', 'yes' => 'Yes' ), )); piklist('field', array( 'type' => 'group' //,'field' => 'notice_group' ,'label' => __('Notice Group', 'piklist-demo') ,'list' => false ,'fields' => array( array( 'type' => 'text' ,'field' => 'notice_title' ,'label' => __('Title', 'piklist-demo') ,'columns' => 12 ,'attributes' => array( 'placeholder' => 'Notice Title' ) ) ,array( 'type' => 'radio', 'field' => 'notice_colour', 'label' => 'Notice Colour', 'choices' => array( 'warning' => 'Yellow', 'success' => 'Green', 'info' => 'Blue', 'danger' => 'Red' ), ) ,array( 'type' => 'textarea', 'field' => 'notice_text', 'label' => 'Contents', 'attributes' => array( 'class' => 'regular-text', 'rows' => 2, 'placeholder' => 'Notice text goes here' ), 'columns' => 12, ) ) //end of fields ,'on_post_status' => array( 'value' => 'lock' ) ,'conditions' => array( array( 'field' => 'notice_option', 'value' => 'yes' ) ) )); piklist('field', array( 'type' => 'text', 'field' => 'notice_test', 'label' => 'Notice Test', /*'conditions' => array( array( 'field' => 'notice_choices', 'value' => 'yes' ) ),*/ 'columns' => 10 ));It’s happening with and without the conditional. I’ve added a basic test field that is just text. Happens here too.
Scratching my head.
-
September 29, 2017 at 10:50 am #8399
exposuredesignMemberSo after some testing it’s pretty much all fields added by piklist except those in repeater fields?!
What on earth could have caused this and failed so silently?
-
September 29, 2017 at 11:05 am #8400
exposuredesignMemberSorry ….. i’d added the remove_post_type_support for post but not pages! Sorry. Working fine now.
-
-
AuthorPosts
Viewing 2 reply threads
- You must be logged in to reply to this topic.