我在 wordpress 中插入了值产品价格、名称和大小。插入代码如下
function products_save_postdata($post_id) {
if (isset ($_POST['price'])) {
update_post_meta($post_id, 'price', esc_attr($_POST['price']));
}
if (isset ($_POST['product_name'])) {
update_post_meta($post_id, 'product_name', esc_attr($_POST['product_name']));
}
if (isset ($_POST['size'])) {
update_post_meta($post_id, 'size', esc_attr($_POST['size']));
}
}
我怎样才能获取这个插入的数据?