PHP Conditionals – Redirect To Options Page
-
Hello,
Great plugin, I am about to upgrade to pro.I am using PHP conditionals to show content to members or to the author of a custom post.
if (current_user_can("access_s2member_level2") || $current_user->ID == $post->post_author){ ?> Protected Content Is Here <?php } else { ?> <script type="text/javascript"> window.location.replace("https://www.myurl.com/membersoptionpage"); </script>
It works, but is there a better way to do this where I would not need to use the Javascript redirect?
Thanks very much!
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘PHP Conditionals – Redirect To Options Page’ is closed to new replies.