Sửa lỗi kích thước font hiện% không hiện px

Một lỗi rất hay gặp khi soạn thảo văn bản trên wordpress và rất may, nó rất dễ để sửa. Hãy làm theo các bước sau:

Bước 1

- Vào Giao diện > Sửa Giao diện

Bước 2

- Mở file functions.php

Bước 3

- Thêm đoạn mã sau:
add_filter ('the_content', 'g_add_post_content', 0);
if ( ! function_exists( 'smom_mce_text_sizes' ) ) {
function smom_mce_text_sizes( $initArray ){
$initArray['fontsize_formats'] = "9px 10px 12px 13px 14px 16px 17px 18px 19px 20px 21px 24px 28px 32px 36px";
return $initArray;
}
add_filter( 'tiny_mce_before_init', 'smom_mce_text_sizes', 99 );
}
Cuối cùng, chúc bạn may mắn!