Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Sắp xếp bài viết theo ngày cập nhật
function order_posts_by_mod_date($orderby) {
if (is_home() || is_archive() || is_feed()) {
$orderby = "post_modified_gmt DESC";
return $orderby;
add_filter('posts_orderby', 'order_posts_by_mod_date', 999);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment