hi.
i am using latest version of BP and WordPress.
and i am working on a food & recipe website.
in this website, i’d like to show the “private message” button only on admin’s page.
something with the help of:
if (current_user_can(administrator) && is_admin())
{ \\show the button on his profile }
else
{ \\hide the button on profiles }
Or maybe:
if(current_user_id == 1) \\for example user 1 is admin
{ \\show the message button on his profile for others to see }
—–
as an example: imagine you have 4 users. user A, user B, user C, user D.
Role user A : admin
Role user B & C & D : subscribers/or/authors/or/editor/or…
subscribers can’t see the private message button on each others profile page to send each other message.
but when they visit User A profile page, they can see the button , and can send message only to admins…
i searched a lot, but all i found was how to hide that button, or remove it.
but not show it only on some profiles for others to see .
any help would be much appreciated.
thanks a lot.