latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Import posts and assign restriction levels

Home Forums Community Forum Import posts and assign restriction levels

This topic contains 2 replies, has 2 voices. Last updated by  Rob Condon 3 years, 10 months ago.

Topic Author Topic
Posted: Monday Feb 18th, 2013 at 1:25 am #42238

I am using a csv import utility to import over 600 posts and want to assign some of them as restricted to FREE users and the rest to PAID users. I could not find anything related here, can you tell me if this is possible and how I would do it?

Thanks
Rob

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Monday Feb 18th, 2013 at 10:49 pm #42399
Staff Member

Thanks for your inquiry. ~ We appreciate your patience :-)

Either before, during or after your import; you can protect Posts or Pages through PHP code like this.

<?php
$options = get_option('ws_plugin__s2member_options');

$options&#91;'level1_posts'&#93; = '123,456,789'; // Protects three Posts by ID at Level #1.
$options&#91;'level1_pages'&#93; = '123,456,789'; // Protects three Pages by ID at Level #1.

udpate_option('ws_plugin__s2member_options', $options);
?>

Of course you could just as easily assemble a comma-delimited list of IDs to protect and input that data in the Dashboard. See also: Dashboard -› s2Member® -› Restriction Options -› Page Access Restrictions

You don’t need to do anything for public content; only for content that should be protected from public access.

Posted: Tuesday Feb 19th, 2013 at 12:21 am #42414

As always, most excellent. This will suit my needs to a T!
Thanks

Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.