Wordpress 向登录用户显示不同的徽标
如何向登录用户显示不同的logo或header.php,最好不包括管理员。我在WordPress网站上工作,希望只向登录的成员显示不同的徽标(或另一个header.php) 谢谢您可以使用该功能 在模板中,如:Wordpress 向登录用户显示不同的徽标,wordpress,Wordpress,如何向登录用户显示不同的logo或header.php,最好不包括管理员。我在WordPress网站上工作,希望只向登录的成员显示不同的徽标(或另一个header.php) 谢谢您可以使用该功能 在模板中,如: <?php // yourtemplate.php if (is_admin()) : get_header('admin'); // for admin use: header-admin.php elseif (is_user_logged_in()) : g
<?php // yourtemplate.php
if (is_admin()) :
get_header('admin'); // for admin use: header-admin.php
elseif (is_user_logged_in()) :
get_header('user'); // for logged in user use: header-user.php
else :
get_header(); // guest or everything else
endif;
// content here
// footer here
// etc
谢谢@error overflow。我实现了一个标志,它真的工作。但是,如果有办法显示不同的徽标/页眉。。我的意思是我想在example.com/this_页面和嵌套在此_页面下的所有其他页面上显示。希望一定有解决办法。再次感谢