PriMoThemes — now s2Member® (official notice)
This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™
<?php
if (! current_user_can("access_s2member_level2")) {
wp_redirect( home_url('/sign-up/') );
exit();
}
?>
Jason Caldwell wrote:OK, just to clarify for the benefit of other readers. s2Member DOES support Custom Post Types. You can protect Custom Post Types with s2Member's Post Level Access Restrictions in your Dashboard, under: s2Member -> Restriction Options -> Post Level Access Restrictions.
<?php
add_action ("wp", "my_custom_s2_security_gate");
function my_custom_s2_security_gate ()
{
if (!is_admin() && is_singular ("my_custom_post_type") && !current_user_can ("access_s2member_level1"))
/* This protects "all" Posts of Post Type: `my_custom_post_type`. See: <http://codex.wordpress.org/Conditional_Tags#A_Single_Page.2C_Single_Post_or_Attachment>. */
wp_redirect (get_page_link ($GLOBALS["WS_PLUGIN__"]["s2member"]["o"]["membership_options_page"])) . exit ();
}
?>
Users browsing this forum: Exabot [Bot], Yahoo [Bot] and 2 guests