Contact Form 7 BR removing function

Add this to your bottom of functions.php file.

add_filter("wpcf7_mail_tag_replaced", "suppress_wpcf7_filter");
function suppress_wpcf7_filter($value, $sub = "") {
    $out = !empty($sub) ? $sub : $value;
    $out = strip_tags($out);
    $out = wptexturize($out);
    return $out;
}
function wpex_fix_shortcodes($content) {
    $array = array(
        ']
' => ']'
    );
    $content = strtr($content, $array);
    return $content;
}
add_filter('the_content', 'wpex_fix_shortcodes');

Leave A Comment?

You must be logged in to post a comment.