Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

robahas on "Can't save meta box input"

$
0
0

Hi - I'm making post meta boxes and I am stuck on the update piece. There is no sign of my meta en the database and I can't see what is wrong with my code:

add_action ('save_post', 'rah_save_page_meta');
function rah_save_page_meta($post_ID) {
update_post_meta( $post_ID, '_single-page-footer-text-1', $_POST['single-page-footer-text-1'] );
}

the data is collected from here, in the add_meta_box defined function:

<textarea style="width:50%; min-height:100px;" name="single-page-footer-text-1"><?php echo get_post_meta( $post->ID, '_single-page-footer-text-1', true ); ?></textarea>

I don't have to add the save_post action from within any other function do I?


Viewing all articles
Browse latest Browse all 8245

Trending Articles