Forums

Join
bbPress Support ForumsTroubleshootingadding wordpress admin link

Info

adding wordpress admin link

  1. Hi,

    Does anyone know how I could add the wordpress logged in link to the bbpress logged in think depending on the user. So admins could be the only one to see the link to the wordpress backend?

    Thanks,
    Rich

  2. Sure. Paste this in your HTML code somewhere:

    <?php if( bb_current_user_can('administrate) {
    $wp_admin = 'http://link.to.your/wordpress/wp-admin/';
    echo '<a href="'.$wpadmin.'">WordPress Admin</a>'; } ?>
  3. hey,

    it doesn't seem to be working! i've edited it a little

    <?php if( bb_current_user_can('administrate') {
    	$wpadmin = 'wordpress/wp-admin/';
    	echo '<a href="'.$wpadmin.'">WordPress Admin</a>'; } ?>)
  4. Does that work? It should have been:

    <?php if( bb_current_user_can('administrate) ) {
    $wp_admin = 'wordpress/wp-admin/';
    echo '<a href="'.$wpadmin.'">WordPress Admin</a>'; } ?>

    Sorry! :/

  5. yeah, i saw the problem! thanks for the help

  6. You must log in to post.