Evening, I'm trying to get something that I can key off for showing and hiding wordpress menu's depending on if the user is logged into amember or not. I've tried a couple solution but can't seem to get something that works across the board. if (!Am_Lite::getInstance()->isLoggedIn()) { // user is not logged in. $amember_session = false; }else{ // user is logged in. $amember_session = true; } I also saw some stuff about bootstrap.php but that started throwing errors 'Script Error An internal error happened in the script, please contact webmaster for details' Any insight on what function I can use to show/hide things would be great. Thanks in advance
If you are using amember4 plugin in wordpress try to use this code: PHP: if(am4PluginsManager::getAPI()->isLoggedIn()) print "Logged in!";else print "not logged in!";