Nếu bạn gặp phải lỗi như hình bên dưới: Chữ sẽ hiển thị dài mãi mà không ngắn đoạn. Điều này thường xảy ra khi bạn copy nội dung từ một website khác hoặc copy nội dung từ word lên website

Bạn hãy thêm đoạn code sau vào file functions.php trong theme của bạn

function tmdev_remove_space_charater( $content ) {
    $string = htmlentities($content, null, 'utf-8');
    $content = str_replace(" ", " ", $string);
    $content = html_entity_decode($content);     
    return $content;    
}
add_filter( 'the_content', 'tmdev_remove_space_charater', 999 );

Bài viết liên quan

post-no-image

Chia sẻ một số thư viện loading css đẹp

giai-phap-chinh-css-khong-bi-luu-cache-trinh-duyet

Giải pháp tốt khi chỉnh sửa css mà không sợ bị lưu cache trình duyệt

post-no-image

Một số css tùy biến thẻ input type: select, number

post-no-image

Tắt lazyload cho một số hình ảnh

post-no-image

Tuỳ biến layout YITH WooCommerce Wishlist

post-no-image

Một số hook hoặc filter thường sử dụng trong plugin WPML