Theme switcher only for Admin?
-
I’m trying to wrap the Theme switcher plugin so that only the admin can see it. That way I can work on a backup theme while my site’s regular viewers see the regular theme I have set as default. However, I don’t seem to have the PHP code right. Can anyone help?
Here is what I have:
<?php global $user_level; if ($user_level > 8) { ?>
<ul>
<h2>Theme Switcher</h2>
<li>
<?php get_theme_switcher() ?>
</li>
</ul>
<?php } ?>If I remove the PHP code the theme switcher shows up just fine. With the PHP code I never see anything. I even tried adding an “echo $user_level;” command, but that didn’t do anything either. What am I missing?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Theme switcher only for Admin?’ is closed to new replies.