Support » Plugin: DB Posts per page » Admin page list affected by plugin!

Viewing 1 replies (of 1 total)
  • Add the if ! admin to the function and it doesn’t affect the admin pages!

    like this!

    function db_post_per_page_set() {
    	global $wp_query;
    	  if (!is_admin()){
    	if( isset( $_COOKIE['db_posts_per_page'] ) ) {
    		$wp_query->query_vars['posts_per_page'] = $_COOKIE['db_posts_per_page'];
    	}
    }
    }

    Happy Coding!

Viewing 1 replies (of 1 total)
  • The topic ‘Admin page list affected by plugin!’ is closed to new replies.