My membership plug in won't let me re-direct custom post type archive / taxonomy URLs to a non-member page if the user requesting access is not logged in or not a member. So, I am trying a hack to check if user is Level A, B, C etc and if not the template page redirects to a no access page.
I'm using the code below to check for access levels. What would be the best way to insert a page redirect?
<?php
if(mgm_user_is(array('level1','level2' ))) {
echo 'REDIRECT TO NON-MEMBER PAGE';
} else {
echo 'GIVES ACCESS TO PAGE SEARCHED FOR';
} ?>