- This topic has 7 replies, 2 voices, and was last updated 6 years, 5 months ago by
Steve.
-
AuthorPosts
-
-
August 24, 2015 at 5:56 pm #4252
achowellMemberSeems like one of my text-area boxes is duplicating in one of my meta-boxes, and it’s not consistent in the amount in each individual post (of the post type). I attached an example.
I checked the code and the only field name with the ‘project_description’ value is that one, all I really have for this field is this:
piklist('field', array( 'type' => 'textarea' ,'scope' => 'post_meta' // Not used for settings sections ,'field' => 'project_description' ,'label' => 'Project Description' ,'description' => 'This is a description of the project.' ,'attributes' => array( 'class' => 'text' ) ));I’m having difficulty figuring out what may have caused this.
Attachments:
You must be logged in to view attached files. -
August 25, 2015 at 12:04 am #4255
SteveKeymaster@achowell– This code snippet looks fine. It would help if we can see all your code. Either post here, or email to [email protected]
-
August 25, 2015 at 11:46 am #4260
achowellMemberThanks Steve, it’s in my meta-boxes folder and this is the entirety of the code for this meta box, I have one other meta box and it does not have this problem (as far as I have seen).
<?php /* Title: Project Information Post Type: mro_project Order: 2 priority: high */ ?> <?php piklist('field', array( 'type' => 'text' ,'field' => 'project_address' ,'label' => 'Address' ,'description' => 'Project Address' //,'value' => 'Default text' ,'help' => 'Enter the address of the project.' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'text' ,'field' => 'project_city' ,'label' => 'City' ,'description' => 'City of the project' //,'value' => 'Default text' ,'help' => 'Enter the city location of the project.' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'text' ,'field' => 'project_state' ,'label' => 'State' ,'description' => 'State of the project' //,'value' => 'Default text' ,'help' => 'Enter the state location of the project.' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'text' ,'field' => 'project_zip' ,'label' => 'Zip' ,'description' => 'Zip Code of the project' //,'value' => 'Default text' ,'help' => 'Enter the zip code of the project.' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'textarea' ,'scope' => 'post_meta' // Not used for settings sections ,'field' => 'project_description' ,'label' => 'Project Description' ,'description' => 'This is a description of the project.' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'textarea' ,'scope' => 'post_meta' // Not used for settings sections ,'field' => 'project_comments' ,'label' => 'Project Comments' ,'description' => 'Enter any extra comments or notes here.' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'textarea' ,'scope' => 'post_meta' // Not used for settings sections ,'field' => 'project_transport' ,'label' => 'Project Transportation' ,'description' => 'Enter transportation information on the project.' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'text' ,'field' => 'project_limit' ,'label' => 'Volunteer Limit' ,'description' => 'Enter the max # of volunteers' //,'value' => 'Default text' ,'help' => 'If there is no limit enter 0.' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'text' ,'field' => 'leader_limit' ,'label' => 'Team Leader Limit' ,'description' => 'Enter the max # of team leaders' ,'value' => '1' ,'help' => 'If there is no limit enter 0.' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'datepicker' ,'scope' => 'post_meta' // Not used for settings sections ,'field' => 'project_date' ,'label' => 'Date' ,'description' => 'Click in box to set the date of the project' ,'attributes' => array( 'class' => 'text' ) ,'options' => array( 'dateFormat' => 'M d, yy' ,'firstDay' => '0' ) )); piklist('field', array( 'type' => 'text' ,'field' => 'project_starttime' ,'label' => 'Start Time' ,'description' => 'Set the time the project starts' ,'help' => 'Enter the time the project starts' ,'attributes' => array( 'class' => 'text' ) )); piklist('field', array( 'type' => 'text' ,'field' => 'project_endtime' ,'label' => 'End Time' ,'description' => 'Set the time the project ends' ,'help' => 'Enter the time the project ends' ,'attributes' => array( 'class' => 'text' ) )); /* piklist('field', array( 'type' => 'group' ,'label' => 'Start/End Time' ,'description' => 'Set the times the project begins and ends.' ,'fields' => array( ,array( 'type' => 'text' ,'field' => 'project_start' ,'label' => '' //,'columns' => 3 ,'value' => '12:00 AM' ) ,array( 'type' => 'text' ,'field' => 'project_end' ,'label' => '' //,'columns' => 3 ,'value' => '12:00 PM' ) ) )); */ ?>
-
-
August 25, 2015 at 8:33 pm #4264
SteveKeymasterI tested this code and it works great for me. Are there any other Piklist meta boxes on the page? If so, make sure none of them have a field called
project_description -
August 27, 2015 at 11:23 am #4266
SteveKeymasterDoes this happen on EVERY new post?
Try this and see if it helps:
piklist('field', array( 'type' => 'textarea' ,'scope' => 'post_meta' // Not used for settings sections ,'field' => 'project_description' ,'label' => 'Project Description' ,'description' => 'This is a description of the project.' ,'attributes' => array( 'rows' => 10 ,'cols' => 50 ,'class' => 'large-text' ) ));
-
-
AuthorPosts
- You must be logged in to reply to this topic.