Few days ago a loyal reader (thx Sullivan) asked how to increase the height of the categories listing in WordPress admin since he has a lot of categories. If you wonder what categories listing it’s the one on the “add new post” page where you select which categories will the post be in (it’s also located on other places).

CSS hack

This hack is a simple CSS hack that allows you to change the height of the default 200px to a new fixed height.

add_action('admin_head', 'categories_list_height_css');

function categories_list_height_css() {
	echo'
	<style type="text/css">
		#category-all.tabs-panel{ height:500px; }
	</style>
	';
}

jQuery hack

This is a bit better hack because it will change the height dynamically to fit all the categories.

add_action('admin_head', 'categories_list_height_jquery');

function categories_list_height_jquery() {
	echo'
	<script type="text/javascript">
		jQuery(function($){
			$("#category-all.tabs-panel").height($("#categorychecklist").height());
		});
	</script>
	';
}

Both hacks go inside functions.php file inside your theme folder.

Visit the best themes marketplace with over 600 premium wordpress themes.