Adicionar post meta wordpress
<?php
$post_id = 1;
$meta_key = '_test';
$meta_value = 'this is a test';
$unique = true;
add_post_meta( $post_id, $meta_key, $meta_value, $unique );
Caped Baldy