Posted on September 28, 2015
function wpsnipp_render_subtitle_metabox() { // Add an nonce field for security.. we'll verify it later when saving the data wp_nonce_field( 'wpsnipp_subtitle_metabox', 'wpsnipp_subtitle_metabox_nonce' ); // Retrieve the existing value (if any) to display in the field. $subtitle = get_post_meta( get_the_ID(), 'wpsnipp_post_subtitle', true ); // Add our input field ?> <p><input type="text" class="widefat" id="wpsnipp-subtitle" name="wpsnipp-subtitle" value="<?php echo esc_attr( $subtitle ); ?>" /></p> <?php }
Recent Comments