[Wordpress] Anh em cho mình hỏi
Mr.BTD11/02/20191254 lượt xem6 bình luận
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\
Bình luận
Đang tải...
Đang kiểm tra đăng nhập...
