bbPress

Simple, Fast, Elegant

bbPress support forums » Troubleshooting

adding wordpress admin link

(5 posts)
  • Started 1 year ago by midnightsun
  • Latest reply from midnightsun
  • This topic is resolved
  1. midnightsun
    Member

    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

    Posted 1 year ago #
  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>'; } ?>
    Posted 1 year ago #
  3. midnightsun
    Member

    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>'; } ?>)
    Posted 1 year ago #
  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! :/

    Posted 1 year ago #
  5. midnightsun
    Member

    yeah, i saw the problem! thanks for the help

    Posted 1 year ago #

RSS feed for this topic

Reply

You must log in to post.

Code is Poetry.