user role box under profile picture
-
hi,
i am using latest version of wordpress and buddypress.
in site, i want the users to know who is admin of website.
so i decided to create a small box under profile picture, which should say the current user role.
(just like the one, here on buddypress)(you can see my user role as Member)(Participant)(Moderator)…1 – i created a css property :
.buddypress-under-avatar-img-txt {height:auto;width:90px;background:green;border:1px;color:black;padding-bottom:3px;text-align:center;}
2 – copy/paste ” cover-image-header.php ” file
From:
wp-content/plugins/buddypress/bp-templates/bp-legacy/buddypress/members/single
To:
wp-content/themes/my-theme/buddypress/members/single3 – and added my code on line 27:
<?php bp_displayed_user_avatar( 'type=full' ); ?> <div id="buddypress-under-avatar-img-txt"> <?php if (current_user_can('administrator')) ?> <br /><p <?php printf ('Admin of site'); ?> </p> </div>
but the box is not showing.
can anyone please help me on this? which part of my code is wrong? how can i correct it?any help would be appreciated.
- You must be logged in to reply to this topic.