Tweak Meta for Post to work it for Pages also

There is a line in the code reference, which is used to save the meta values:

$slug = "post";
if($slug != $post->post_type) {
    return $post_id;
}

This will simply end the function if you are not on a post. To allow saving data on a page, use this instead (remove the $slug):

if('post' != $post->post_type || 'page' !=$post->post_type) {
    return $post_id;
}