0

I’ve a created WordPress membership site using wishlist member plugin. But I want to have different header.php based on different logins.

Eg: Users are: Print, Web and Free

  • When Free user logs in – I want header1.php to load and stay till he logs out
  • When Print user logs in – I want header2.php to load and stay till he logs out
  • When Web user logs in – I want header3.php to load and stay till he logs out

If nobody has logged in the default header.php stays.

Please assist on how to do this.

4

1 回答 1

0

尝试使用包含,在标题的位置包含此代码注意编辑变量 $userType 的名称:

switch($userType)
{
case "free": { include("header1.php"); break;}
case "Print": { include("header2.php"); break;}
case "Web": {include("header3.php"); break;}
default: {include('header.php'); break; //nobody logged in 
}
}
于 2013-01-22T07:04:15.297 回答