Info
- 5 posts
- 2 voices
- Started 5 years ago by midnightsun
- Latest reply from midnightsun
- This topic is resolved
adding wordpress admin link
-
- Posted 5 years ago #
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 5 years ago #
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 5 years ago #
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 5 years ago #
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 5 years ago #
yeah, i saw the problem! thanks for the help
-
You must log in to post.