Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global $wp_query;
- $wp_query->set('order', 'ASC');
- add_action('pre_get_posts','myf88');function myf88($query) {
- if ( !is_admin() && $query->is_main_query() ) {
- if ( $query->is_category ) {
- $query->set('post_type', array('post','page','my_postType') );
- add_filter( 'posts_where' , 'MyFilterFunction_1' );
- }
- //for "PAGE" type, this doesnt work (IT is WORDPRESS FAULT) , so you may modify "query_posts" in page.php,before loop
- }
- }
- function MyFilterFunction_1($where) {global $wpdb; $where .= " AND ({$wpdb->posts}.post_name NOT LIKE 'Journal%')"; return $where; }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement