Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function prefix_modify_query_order( $query ) {
- if(is_main_query()){
- $query->set('orderby', 'post_modified');
- $query->set('order', 'DESC');
- }
- }
- add_action('pre_get_posts', 'prefix_modify_query_order');
Add Comment
Please, Sign In to add comment