2021年5月3日星期一

add_post_meta() function in WORDPRESS not working properly

One of the parameters of this function is the value for the meta_key. When I use a basic string like "hello" or "house" as a value the function works fine but when i store that value in a variable i don't know why don't work properly, it just not store de value in the custom field. Any help please thanks

// This work  add_post_meta( $post_ID, 'Name', 'Jack', true );    // This isn't  $name = "Jack";  add_post_meta( $post_ID, 'Name', $name, true );  
https://stackoverflow.com/questions/67377890/add-post-meta-function-in-wordpress-not-working-properly May 04, 2021 at 10:05AM

没有评论:

发表评论