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

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

post-no-image

Cách thay đổi parameter của url trong javascript

post-no-image

Tuỳ biến phần search WordPress chính xác hơn, tìm kiếm theo tiêu đề

post-no-image

Cách quét và tìm virus trong Database WordPress để loại bỏ mã độc Malware

post-no-image

Hướng dẫn custom Multiselect box