Posted By

goddess on 04/23/09


Tagged

wordpress


Versions (?)

Who likes this?

4 people have marked this snippet as a favorite

kristarella
girliegeek
maxvee8
YA


WP Admin Only Links


 / Published in: PHP
 

URL: http://codex.wordpress.org/Roles_and_Capabilities

Down & Dirty Wordpress code to show specific links only to admininstrators. Can be refined using WP roles and Capabilities for more specific needs.

  1. <?php if (current_user_can('manage_options')){ ?>
  2. <a href="/wp-admin">Dashboard</a> - <?php wp_loginout(); ?>
  3. <?php }?>

Report this snippet  

You need to login to post a comment.