// 🔒 UMP Course Access Restriction Logic add_action('template_redirect', 'check_user_course_access'); function check_user_course_access() { // Only run on frontend and when viewing a single post/page if (is_admin() || !is_singular()) return; global $post; // Slugs of protected course pages (change these to match your course URLs) $protected_slugs = ['course-1', 'python-masterclass', 'excel-training']; // If current page is not one of the protected slugs, allow access if (!in_array($post->post_name, $protected_slugs)) return; // Redirect if user is not logged in if (!is_user_logged_in()) { wp_redirect(site_url('/course-access-warning')); // Your custom warning page slug exit; } // Get current user and course page ID $user_id = get_current_user_id(); $post_id = $post->ID; // Use UMP to check access if (function_exists('UMP_hasAccess')) { $has_access = UMP_hasAccess($user_id, $post_id); if (!$has_access) { wp_redirect(site_url('/course-access-warning')); // Your custom warning page slug exit; } } else { // Optional: Log error if UMP is not active error_log('UMP_hasAccess function not available.'); } } OptimizePress - Getting Started

You're almost done, just a few more steps.

  • Download and Install OptimizePress Theme

    Already done.

  • 2

    Turn on your Blog from the Blog Settings

    Inside Blog Setup you will be able to turn Blog on.

  • 3

    Choose a Blog Theme for your Website

    Inside Blog Setup you will be able to adjust Blog settings.

  • Troubleshooting

    If you have completed blog setup and still see this message please tick the box in Dashboard -- Global Settings -- External Plugin Compatibility.