I’m using wp_insert_post
function to insert a new post:
$result = wp_insert_post(array("post_title"=>"test1"), true);
When I echo
the result of the function, I get the number 335. How can I see what is the meaning of this code. I tried this with no success:
$error = new WP_Error($result);
echo ($error->get_error_message($result));