How to disable category without deleting?

I have solved the problem myself, but it is not a pretty one. With the function attached to the add_meta_boxes action hook, I change the callback function that builds the category box. It replaces this function with the customized function post_categories_meta_box_custom. post_categories_meta_box_custom is a copy of post_categories_meta_box from wp-admin/includes/meta-boxes.php. With the help of simple-html-dom the … Read more

Show recent posts in menu?

you can use a walker like this, class Walker_Recent_Post_Category extends Walker_Category { function start_el(&$output, $category, $depth, $args) { extract($args); $cat_name = esc_attr( $category->name); $cat_name = apply_filters( ‘list_cats’, $cat_name, $category ); $list_recent_cat_post=”<ul class=”show-hide”>”; $args = array( ‘numberposts’ => 5, ‘category_name’ => $category->name ); $myposts = get_posts( $args ); foreach( $myposts as $mypost ) : $list_recent_cat_post .= … Read more