Hello have been looking at this for quite a while and cant seem to resolve it was hoping someone more familiar with the wordpress core and php could share some idea.
What I want to accomplish essentially is to Hide a div that permits buddypress users (the subscrivers) from adding new topics to a group forum. But I dont want this to be hidden from all the forums just 1 of them. So I need 2 pieces 1 that determines whether someone is a subscriber or an admin. so its only hidden to the subscriber. and 2 that it hides it from only 1 page.
Example of potential code just need to fit it together (all code would go in the functions.php unless there is another way)
<?php /* If this is the frontpage */ if ( is_home() || is_page() ) { ?>
have info link or whatever in here
<?php } ?>
Thats for the frontpage but similarly you can get the page by ID
For role I saw this
is_admin()
I would assume there is a
is_subscriber()
and from there you can do an if in the php something like if is_subscriber() and is_page( 42 ) call .js file and from there add a class that hides the div I want to hide by jquery
Thats as far as I got from what I know and looking around. I would greatly appreciate any and all assistance.
is_admin()
checks for whether the user is on the Dashboard or administration panel, not whether the user is the adminastrator of the site. – mrwweb May 15 '12 at 3:10