- This topic has 1 reply, 2 voices, and was last updated 2 years, 9 months ago by .
Viewing 2 posts - 1 through 2 (of 2 total)
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
WordPress Membership Plugin
Simple Membership Plugin › Forums › Simple Membership Plugin › Directives for wp_insert_post
I add posts via the standard wp_insert_post method from a php file like
$post_data = array(
‘post_author’ => $author_id,
‘post_category’ => $category_id,
‘post_title’ => $title,
‘post_excerpt’ => $excerpt,
‘post_content’ => $content,
‘post_type’ => ‘post’,
‘post_status’ => ‘publish’
);
$post_id = wp_insert_post($post_data);
What are the correct directives for protecting the post and assigning a membership level via wp_insert_post? for example will this work?
‘swpm_protect_post’ => ‘2’,
‘swpm_protection_level’ => ‘3’
Your request is beyond the scope of the free support forum. You have 2 options.