After I added a post by wp_insert_post();
Any callback after I added ? I need permalink of added post.
I have idea only search by title and post-type (I use custom post-type in my case), But any better function ?
$post_id = wp_insert_post( $arg ); #returns post ID
$permalink = get_permalink( $post_id ); #returns the permalink
Oh I found !
$post_id = wp_insert_post($arg); // return post ID
Sign up using Google
Sign up using Facebook
Sign up using Stack Exchange
2 years ago
9 months ago