Which is exactly the .php files where I have to add the new check-box?
Should be correct this .php code for my esigence?
/*********************************************************************/
/* Add featured post checkbox
/********************************************************************/
add_action( ‘add_meta_boxes’, ‘add_featured_checkbox_function’ );
function add_featured_checkbox_function() {
add_meta_box(‘featured_checkbox_id’,’FEATURED POST ?’, ‘featured_checkbox_callback_function’, ‘post’, ‘normal’, ‘high’);
}
function featured_checkbox_callback_function( $post ) {
global $post;
$isFeatured=get_post_meta( $post->ID, ‘is_featured’, true );
?>
<input type=”checkbox” name=”is_featured” value=”yes” <?php echo (($isFeatured==’yes’) ? ‘checked=”checked”‘: ”);?>/> YES
<?php
}
add_action(‘save_post’, ‘save_featured_post’);
function save_featured_post(){
global $post;
update_post_meta( $post_id, ‘is_featured’, $_POST[‘is_featured’]);
}
Thank you in advance for all in that you can support me