Skip to:
Content
Pages
Categories
Search
Top
Bottom

remove paragraph markup from around status updates in the activity stream

  • @rogercoathup

    Participant

    I’m trying to remove the paragraph ([p] [/p]) markup that gets inserted around status updates when they are displayed in the activity stream.

    I’ve tried adding the following to my bp-custom.php:

    remove_filter( ‘bp_get_activity_content_body’, ‘wpautop’ );
    remove_filter( ‘bp_get_activity_content’, ‘wpautop’ );

    But, it has no effect.

    Anyone have a fix?

Viewing 3 replies - 1 through 3 (of 3 total)
  • @nuprn1

    Participant

    works in the theme’s function.php file (also make sure you don’t have curly quotes – at least copying the above code resulted in)

    @sbrajesh

    Participant

    or you can keep in bp-custom.php, if you hook it to init action.

    add_action("init","remove_autop_filters_from_activity");
    function remove_autop_filters_from_activity(){
    remove_filter( 'bp_get_activity_content_body', 'wpautop' );
    remove_filter( 'bp_get_activity_content', 'wpautop' );
    }

    Actually, the remove filter should be called after the filter is actually added.

    @rogercoathup

    Participant

    Thanks guys (both solutions work) –

    I’m always forgetting to hook calls to the init action in bp-custom.php. I won’t again!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘remove paragraph markup from around status updates in the activity stream’ is closed to new replies.
Skip to toolbar