I have a function in function.php and it does wp_insert_post. how can I get the post id which just posted?
when I do wp_insert_posts, it saves a PR value (unique and it saves in post-meta table). Do I need to do "select"? like select post_id from wp-post where oid=".$oid...... etc like this?
I have tried to get
$post_id = wp_insert_post($new_post); $post_id = get_post($post_id) But these are not working.
I am not also very good at wp join. how can I do?