Get post meta retrieving wrong value

Please take some time to read the Codex. the_ID echos content. That means that the ID is never being passed to get_post_meta. It is just echoed in place. From the same Codex Page: Note: This function displays the ID of the post, to return the ID use get_the_ID(). So, use get_the_ID instead. Second problem… quote … Read more

input radio ‘checked’ saves, but select option ‘selected’ doesn’t

It was a long way around to get there but you basically have a markup error. You didn’t name your select. You should have: <select id=”select-taxonomy” name=”<?php echo $name ?>”> // <– here is the change <?php foreach($terms as $term) { $id = $taxonomy.’-‘.$term->term_id; $value= (is_taxonomy_hierarchical($taxonomy) ? “value=”{$term->term_id}”” : “value=”{$term->term_slug}””); echo “<option id=’in-$id’ “. selected($current,$term->term_id,false) … Read more

Add metabox without the container

Use the action edit_form_after_title. Example: add_action( ‘edit_form_after_title’, function() { echo ‘Enter some text: <input type=text>’; }); See this answer for another example.

meta box not display data input in the textarea

Ok, you do have a typo : add_action(‘save_post’, ‘vs_save_custom_meta’); should be : add_action(‘save_post’, ‘vs_save_excerpt_meta’); So you meta box does not have a valid callback. Change this and it will work ^^

Custom metabox not displaying multiselect data in edit mode

I tested your code and this ended up working for me: case ‘multiselect’: echo ‘<select name=”‘.$field[‘id’].'” id=”‘.$field[‘id’].'”>’; foreach ($field[‘options’] as $option) { echo ‘<option’, $meta == $option[‘value’] ? ‘ selected=”selected”‘ : ”, ‘ value=”‘.$option[‘value’].'”>’.$option[‘label’].'</option>’; } echo ‘</select><br /><span class=”description”>’.$field[‘desc’].'</span>’; break; For the Field Array I just added another option with a blank value and a … Read more