Skip to:
Content
Pages
Categories
Search
Top
Bottom

targeting forum / level


  • dbungard
    Participant

    @dbungard

    I’m trying to make it so that only members of a certain s2member view specific styles in ONLY that forum. Please see below – it’s not working but Im not sure how to call the forum.

       <?php 
    	if (forum("professional-membership-2")){
    	if (current_user_can("access_s2member_level0")){ 
    echo '<style>
    .bbp-reply-form{display:none;}
    </style>';
    } elseif (current_user_can("access_s2member_level1")){
    echo '<style>
    .bbp-reply-form{display:none;}
    </style>';
    } elseif (current_user_can("access_s2member_level2")){
    echo '<style>
    .bbp-reply-form{display:none;}
    </style>';
    } elseif (current_user_can("access_s2member_level3")){
    echo '<style>
    .bbp-reply-form{display:none;}
    </style>';
    } else {
    }  
     }  ?>

You must be logged in to reply to this topic.