Created
August 7, 2017 04:52
-
-
Save leducson1/d9d245c2ffedbc66264d01dead2990e1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* sap xem bai viet theo ngay cap nhat | |
function orderby_modified_posts( $query ) { | |
if ($query->is_main_query()) { | |
$query->set( 'orderby', 'modified' ); | |
} | |
} | |
add_action( 'pre_get_posts', 'orderby_modified_posts' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment