Catch metabox values in Plugin
-
I am learning WordPress Plugin development. I would like to catch values of MetaBox. I found below code in Plugin development Handbook.
function wporg_save_postdata( $post_id ) { if ( array_key_exists( 'wporg_field', $_POST ) ) { update_post_meta( $post_id, '_wporg_meta_key', $_POST['wporg_field'] ); } } add_action( 'save_post', 'wporg_save_postdata' );
But in which File should I place these codes ?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Catch metabox values in Plugin’ is closed to new replies.