Ask your WordPress questions! Pay money and get answers fast! (more info)

Hide specific categories in wp backend?

  • SOLVED

Is there a way to hide specific categories in wp backend (dashboard).


Answers (4)

2014-04-20

Navjot Singh answers:

You can try this plugin - http://wordpress.org/plugins/restrict-categories/

or use the solution mentioned here

http://wordpress.stackexchange.com/a/55312

2014-04-20

S├ębastien | French WordpressDesigner answers:

paste in functions.php

function hide_category() {
?>
<script>
jQuery(document).ready(function($) {

$(".categorychecklist #category-7").hide();/*7 is the category id*/
$(".categorychecklist #category-8").hide();/*8 is the category id*/

});
</script>
<?php }

add_filter('admin_head', 'hide_category');



replace 7 and 8 by id of each category you want to hide.
Simply.

2014-04-20

Sabby Sam answers:

Hey there,
You could try this plugin ( http://wordpress.org/plugins/author-category/ )
I have tried several times in my website. Its work great, have a look into the category.
Thanks

2014-04-20

Dbranes answers:

Here's a simple snippet:

is_admin() && add_filter( 'get_terms_args', function( $args, $taxonomy ){

if( 'category' === array_shift( $taxonomy ) ){
$exclude = array( 12, 34 );
$args['exclude'] = $exclude;
}
return $args;
}, 99, 2 );


just edit the <em>$exclude</em> category to your needs (category id's to excluce).