However, people were able to access the H&M Webhelp portion directly, without having to log into the Wordpress site first. This was not what I wanted.
By adding some code to the head of all the Webhelp output, I was able to prevent people from directly accessing the Webhelp, and instead they had to access it through the Wordpress site and the H&M Plugin.
Code: Select all
<?php
# Make sure the user has logged in to our WordPress site:
$wpLoggedIn = false;
foreach ($_COOKIE as $key => $value):
if (stripos($key, 'wordpress_logged_in_') === 0):
$wpLoggedIn = true;
break;
endif;
endforeach;
if(!$wpLoggedIn):
Header("Location: /member-login/");
endif;
?>
I am not a coder, and I had a lot of outside assistance in getting to this point, but I wanted to share my results here because I've been trying to do this for a long time and finally have hit upon a solution.