[wp-hackers] Admin dashboard > category box wish list.

Haluk Karamete halukkaramete at gmail.com
Sun Jul 6 17:57:10 UTC 2014


Answering my own,, sharing for-what-it's-worth!

(1) and (3) of my original wish list taken care of.
I have some sense that wish #2 is impossible without the term_meta. so
leaving that as 'wishful-thinking' and moving on.

here we go...

# keep the category hierarchy on the post editing screen as original
# and expand the category meta box vertically so not we see no scrollbars

# code inspired by
# 1) http://wordpress.org/plugins/category-checklist-tree/
# 2) http://wordpress.org/plugins/category-checklist-expander/

# keep the category hierarchy on the post editing screen as original
add_filter( 'wp_terms_checklist_args', 'blp_checklist_args' ) ;
function blp_checklist_args( $args ) {
    $args['checked_ontop'] = false;
    return $args;
}

# and expand the category meta box vertically so not we see no scrollbars
add_action( 'admin_head', 'blp_category_scroll_bar_be_gone' );
function blp_category_scroll_bar_be_gone() {
    global $wp_version, $pagenow;
    if ( !in_array( $pagenow, array( 'post.php', 'post-new.php' ) ) )
        return;
    ?>
    <style>
        #categorydiv div.tabs-panel, #linkcategorydiv div.tabs-panel {
height: auto; max-height: none; }
    </style>
<?php
}



On Sun, Jul 6, 2014 at 3:26 AM, Haluk Karamete <halukkaramete at gmail.com>
wrote:

> Hello everybody...
>
> On Wordpress dashboard, at the "categories" section, I have 3 basic
> questions. I'd appreciate any lending hands.
>
> (1) How do I change the length of that area so I can display all my cats -
> eliminating the need for the vertical scroll-bar?
>
> (2) How do I ensure that the __top level items__ are listed in an order I
> specify (or even better in the order they were created - sorted by their
> TTID) ?
>    currently, out of the box WordPress displays them in an alpabetical
> order.
>
> and finally,
>
> (3) is there a simple trick to tell WordPress to keep the checked terms in
> their own original hierarchical spot - rather than by moving them to the
> top as currently?
>
>
>


More information about the wp-hackers mailing list