WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I only have this code, which is in functions.php. I can see the field in admin page, but the data is not saving.

add_action('add_meta_boxes', 'home_page_template_meta_box');
function home_page_template_meta_box(){
        __('Home Page Template Options'),

function home_page_template_options(){
    //My custom fields

    $right_side_box_1 = esc_html( get_post_meta( $post->ID, 'Right Side Box 1', true ) );
            <td style="width: 100%">Right Side Box 1</td>
            <td><input type="text" size="80" name="right_side_box_1" value="<?php echo $right_side_box_1; ?>"/></td>
share|improve this question
+1 that code does not have any function to save datas. You just have to follow codex example and use update_post_meta() if $_POST['right_side_box_1'] is set. – JMau Jun 8 '13 at 18:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.