Tag Info

New answers tagged


It looks like what might be happening is that it is in fact saving it, but you are just not outputting the saved value. For example if you have a text input you will need to get the meta first and then echo it as the value attribute: <?php $my_meta = get_post_meta( $post->ID, 'meta_key', true ); ?> <input type="text" name="name" id="id" ...


Try basename( __FILE__ ) instead of plugin_basename( __FILE__ ) I think your nonce is not verifying.


Have you noted that you are verifing that the post type is a page and that user can edit pages and posts? if ( 'page' == $_POST['post_type'] ) { if ( !current_user_can( 'edit_page', $post_id ) ) return; } else { if ( !current_user_can( 'edit_post', $post_id ) ) return; } It should be: if ( 'ranch' == $_POST['post_type'] ) { if ...

Top 50 recent answers are included