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.













Thank you very much Boba!!! It works perfectly and now I can see my categories without scrolling for hours. Very useful.
That’s fantastic, thank you very much!
+ Sullivan, your loyal reader +
You’re welcome Sullivan. If you need anything else feel free to let me know and i’ll see what i can do.
Saya coba dulu di localhost, kalau nanti ada masalah saya tanya lagi disini. Terima Kasih
You’re welcome JhezeR, but write in english next time, wouldn’t understand what you said without Google Translate
Great tip, thanks.
I have a site which uses categories to store geographical locations only, and nested, e.g.
- continent
- – country
- – - region
- – - – town/city
As you can imagine, this become a very long list.
I have an idea of adding an AJAX search field to the category panel so I can enter the first few letters and see a list of matches, then select.
But when I select a name, the results show me the category in it’s nested context, so I can select all.
One of the problems I’ve noticed with WP is that if I select a child, or grand-child category, the parent or grand-parents isn’t automatically selected.