Reputation: 43
How to show a different logo or maybe a different header.php to logged in users, preferably excluding the admins. I am working on a WordPress site and wish to display a different logo (or a another header.php) to logged in members only.
Thanks
Upvotes: 0
Views: 304
Reputation: 41
You can use is_user_logged_in() function.
In your template like:
<?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
Upvotes: 2