MemberPress: Disable MemberPress Protection Based on Custom Post Type And Tag
add_filter(‘mepr-pre-run-rule-content’, ‘mepr_override_content_protection’, 11, 3); function mepr_override_content_protection($protect, $post, $uri) { // Unprotect posts that belong to a specific custom post type (mpcs-lesson), with the “free” tag if (‘mpcs-lesson’ === get_post_type($post->ID) && has_tag(‘free’, $post)) { $protect = false; // Disable protection for…Continue reading