pre_get_posts doesn't work with pretty permalinks anymore
-
Hi,
I have this in my functions.php to limit number of posts displayed for the “retrats” category :function hwl_home_pagesize( $query ) { if ( is_admin() || ! $query->is_main_query() ) return; if ( is_category('retrats') ) { $query->set( 'posts_per_page', 1 ); return; } } add_action( 'pre_get_posts', 'hwl_home_pagesize', 1 );
Since upgrade to 3.8 that doesn’t work anymore with pretty permalinks, only in default ones (then it works)
Someone noticed that already ?
Viewing 14 replies - 1 through 14 (of 14 total)
Viewing 14 replies - 1 through 14 (of 14 total)
- The topic ‘pre_get_posts doesn't work with pretty permalinks anymore’ is closed to new replies.