• Resolved colincameron

    (@colincameron)


    How can I show the link to wp-admin only if Im already logged in?

    I have tried looking in the codex but I cant seem to figure out how

Viewing 2 replies - 1 through 2 (of 2 total)
  • I use:

    <?php global $HTTP_SERVER_VARS; global $user_level; get_currentuserinfo(); if ($user_level < 1) { } else { ?>
    <h4>Admin Meta</h4>
    <ul>
    <?php wp_register(); ?>
    <li><?php wp_loginout(); ?></li>
    <li><a href="http://validator.w3.org/check/referer" title="<?php _e('This page validates as XHTML 1.0 Transitional'); ?>"><?php _e('Valid <abbr title="eXtensible HyperText Markup Language">XHTML</abbr>'); ?></a></li>
    <?php wp_meta(); ?>
    </ul>
    <?php } ?>

    Thread Starter colincameron

    (@colincameron)

    Great, this is exactly what I was looking for!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Show admin link if logged in’ is closed to new replies.