Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove Join Group Buttons


  • welsh10
    Participant

    @welshlamb10

    Hi,

    Does anyone know how to remove the Join Group option for Private groups based on a WP Role?
    Was thinking of using below, but need to work out how the button is called.

    $current_user = new WP_User(wp_get_current_user()->id);
    $user_roles = $current_user->roles; 
    foreach ($user_roles as $role) {
    
       if  ($role == 'subscriber' ){
         //code here for subscribers
       }
    
    Thanks to anyone who helps
    
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.
Skip to toolbar