Skip to:
Content
Pages
Categories
Search
Top
Bottom

adding wordpress admin link


  • midnightsun
    Member

    @midnightsun

    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

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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>'; } ?>


    midnightsun
    Member

    @midnightsun

    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>'; } ?>)

    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! :/


    midnightsun
    Member

    @midnightsun

    yeah, i saw the problem! thanks for the help

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.