Mình viết 1 hàm đơn giản để update post khi truyền dữ liệu vào. Cụ thể
function showdes() { $my_post_update = array( 'ID' => get_the_ID(), 'post_content' => str_replace("[des]","aaa",get_the_content()), ); wp_update_post( $my_post_update );
$des = get_the_content(); return $des; } add_filter('the_content\
