How to integrate the protection of the template Wordpress using php code without the use of SHORTCODES. PHP: <?php session_start(); if ($au=$_SESSION['amember_protect']){ // user is levels } else { // user is not levels } ?> Instead, the code: [amember_protect levels='level1,level2']Test[/amember_protect]
Inside wordpress templates you can use current_user global variable. So, PHP: if(array_intersect(array('level1', 'level2'), (array)$GLOBALS[current_user]->_amember_levels)){// User have level1 or level2}else{// Not have}