在我的网站标题中插入这段代码时出现以下错误。谁能帮我找到错误并修复它?
“解析错误:语法错误,第 49 行 /home/m3999316/public_html/testing/wp-content/themes/gridmarket/header.php 中的意外 T_IF”,这是我的代码:
if ( is_user_logged_in() ) {
global $current_user;
get_currentuserinfo();
echo 'Welcome, '.$current_user->user_login.'';
$user_id = $current_user->ID;
$user_blogs = get_blogs_of_user( $user_id );
$playground = count($user_blogs);
$mainblog_name =
if (is_super_admin()){echo ' | Manage Network';} elseif ($playground == 1) {
echo ' | Start Selling';
} else {
foreach ($user_blogs as $user_blog) {
if ($user_blog->blogname!= 'Marketpress Fronted Plugin - Demo' )
echo 'Manage Store';
}
}
echo ' | Log out';
} else {
echo 'Login | Register';
}
?>