Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global $wpdb;
- $posts = $wpdb->get_results( "SELECT ID, post_title, post_modified_gmt
- FROM $wpdb->posts
- LEFT JOIN $wpdb->term_relationships as t
- ON ID = t.object_id
- WHERE post_type = 'post' AND post_status = 'publish' AND t.term_taxonomy_id = 3
- WHERE post_status = 'publish'
- AND post_password = ''
- AND post_type = 'post'
- ORDER BY post_type DESC, post_modified DESC
- LIMIT 10" );
Add Comment
Please, Sign In to add comment