Created
February 13, 2015 06:17
-
-
Save Irfan-Ansari/f1b9f4b84e9bc475b280 to your computer and use it in GitHub Desktop.
Replace the Post Excerpt Meta Box with a Field in My Custom Meta Box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function my_custom_save_function($post_id){ | |
update_post(array('ID' => $post_id, 'post_excerpt' => $_POST['my_custom_field'])); | |
} | |
add_action('save_post', 'my_custom_save_function'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment