Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- add_action( 'pre_get_posts', 'be_exclude_category_from_blog' );
- /**
- * Exclude Category from Blog
- *
- * @author Bill Erickson
- * @link http://www.billerickson.net/customize-the-wordpress-query/
- * @param object $query data
- *
- */
- function be_exclude_category_from_blog( $query ) {
- if( $query->is_main_query() && $query->is_home() ) {
- $query->set( 'cat', '-2258, -2806, -2695, -2654, -2767' );
- $query->set( 'posts_per_page', '53' );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement