Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
  • in reply to: Different styling based on member type #18457
     Graphikom
    Participant

    Hello,

    I’m sorry but I don’t andestand.
    I add your code in function.php of sweetdare-child
    Where I create the CSS Classes ? And how ? I’m sorry I’m a French newby 🙂

    THE CODE :
    * Adds some required body claasses
    */
    add_filter(‘body_class’,’kleo_body_my_classes’);

    /**
    * Adds specific classes to body element
    * @param array $classes
    * @return array
    * @since 2.1
    */
    function kleo_body_my_classes($classes = ”) {
    global $bp;
    if (is_user_logged_in()) {
    $data = bp_get_profile_field_data( ‘field=I am a&user_id=’ . $bp->loggedin_user->id );
    $classes[] = strtolower(str_replace(‘ ‘, ‘-‘, $data));
    }
    return $classes;
    }

Viewing 1 post (of 1 total)

Log in with your credentials

Forgot your details?