add post meta wordpress
snippet in php

add post meta wordpress

user6126

<?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 );