Help with Custom Field and add_action
-
I need to create a TEXT field on edit post with the value of a meta
can anyone help me?!
thx =)
add_action("admin_init", "content_init"); function content_init() { add_meta_box("duracao", "Duração", "content_meta", "post", "normal", "high"); } function content_meta(){ global $post; $custom = get_post_custom($post->ID); $duracao = $custom["duracao"]; ?> <div class="inside"> <table class="form-table"> <tr> <th><label for="duracao">Duração: </label></th> <td> <input type="text" name="duracao" value="<?php echo $duracao; ?>" /> </td> </tr> </table> </div> <?php } ?>
- The topic ‘Help with Custom Field and add_action’ is closed to new replies.