Skip to:
Content
Pages
Categories
Search
Top
Bottom

No HTML allowed on front end profile page


  • hsutliff
    Participant

    @hsutliff

    I am trying to allow html output in text area on a profile page however this keeps getting stripped out.

    I am trying to add in this hook but it doesn’t seem to effect anything

    `function stuff_i_want_triggered_after_bp_loads(){

    remove_filter( ‘xprofile_get_field_data’, ‘wp_filter_kses’, 1 );

    }

    add_action(‘wp’, ‘stuff_i_want_triggered_after_bp_loads’);`

    This is placed into custom.php in the wp-content/plugins folder wrapped in php tags

    Any help would be appreciated

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

  • hsutliff
    Participant

    @hsutliff

    The aim of this is to allow for line breaks as a minimum if I can!


    danbpfr
    Participant

    @chouf1

    Hi @hsutliff,

    try by adding this to your theme functions.php
    remove_filter( ‘bp_get_the_profile_field_value’,  ‘wpautop’ );

    If you want to know all filters used on xprofile, simply read the file /bp-xprofile/bp-xprofile-filters.php
    About wpautop: https://codex.wordpress.org/Function_Reference/wpautop


    hsutliff
    Participant

    @hsutliff

    Thank you for taking the time to respond. It was a great help and eventually I edited /bp-xprofile/bp-xprofile-filters.php

    On line 48;
    `add_filter( ‘xprofile_get_field_data’,’wpautop’ );`

    Now my custom data fields come through with the html still attached.

    Thankyou.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘No HTML allowed on front end profile page’ is closed to new replies.
Skip to toolbar