0

How can I hide all posts from a single category and not show them in the posts admin screen.

2
  • 1
    How do you try that? Show us your code please.
    – fuxia
    Oct 1, 2012 at 17:28
  • Got it! Answer below! Oct 1, 2012 at 17:53

1 Answer 1

0
function posts_for_current_author($query) {
global $pagenow;

if( 'edit.php' != $pagenow || !$query->is_admin )
return $query;

else {
    $query->set('cat', "-11");
}
return $query;
}
1
  • 1
    Something is missing. A filter registration maybe? :)
    – fuxia
    Oct 1, 2012 at 17:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.