Send email using Subscribe2 with wp_insert_post not in Admin section
-
I’m creating a new blog post through a template. I do that with the following code:
if($_POST['category_name'] != ''){ $cat_ids = $_POST['category_name']; } $bmt_post = array( 'post_title' => wp_strip_all_tags( $title ), 'post_content' => wp_strip_all_tags( $information ), 'post_status' => 'publish', 'post_category' => array( $cat_ids ) ); // Insert the post into the database $post_id = wp_insert_post( $bmt_post );
When I do this it doesn’t send en email using the Subscribe2 plugin. If I create the post from the Admin section the email is sent though. How can I send an email using the Subscribe2 plugin outside of the admin section?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Send email using Subscribe2 with wp_insert_post not in Admin section’ is closed to new replies.