Protecting Non-WordPress Content
f you want to use OptimizeMember to protect content that is being loaded outside of WordPress you can do so by including
wp-load.php from the WordPress core files.
<?php require_once 'wp-load.php';// User is allowed to view, so display something here.
else exit('Permission denied!');
This solution uses PHP code and that means the external pages that use this code will need to be PHP files. Files that end in
.html will not be able to use this code unless you've specifically configured your web server to parse those file types with PHP.
See: How To Parse HTML Files As PHP for more information.