Skip to:
Content
Pages
Categories
Search
Top
Bottom

Textarea Profile Field?


  • Andrew Tibbetts
    Participant

    @andrewgtibbetts

    Is there a way to get a plain, non-wysiwyg textarea (“multi-line text area”) profile field? Sounds like it used to be *only* plain textarea and was recently replaced with wysiwyg. How about both?

Viewing 5 replies - 1 through 5 (of 5 total)

  • Slava Abakumov
    Moderator

    @slaffik

    Try this:

    function remove_wysiwyg($enabled, $field_id) {
        // change this field_id to the one you need to have ordinary textarea
        if ( $field_id == 22 ) 
            return false;
    
        return $enabled;
    }
    
    add_filter( 'bp_xprofile_is_richtext_enabled_for_field', 'remove_wysiwyg', 10, 2 );

    Place the code in bp-custom.php.


    Andrew Tibbetts
    Participant

    @andrewgtibbetts

    Works!
    Thank you.

    WP: 4.4.1
    BP: 2.4.3


    Slava Abakumov
    Moderator

    @slaffik

    if ( $field_id == 22 ) { of course. Shame on me.

    Glad it works for you.


    Andrew Tibbetts
    Participant

    @andrewgtibbetts

    I wasn’t gonna say anything… 🙂


    Datenfresser
    Participant

    @datenfresser

    I’ve added the mentioned code in my bp-custom.php. I get a 500-er error.
    I just changed the field_id, nothing else. Any ideas?

    WP: 4.4.2
    BP: 2.5.1

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.
Skip to toolbar