Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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

share|improve this question
1  
How do you try that? Show us your code please. –  toscho Oct 1 '12 at 17:28
    
Got it! Answer below! –  Lucas Veiga Oct 1 '12 at 17:53
add comment

1 Answer 1

function posts_for_current_author($query) {
global $pagenow;

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

else {
    $query->set('cat', "-11");
}
return $query;
}
share|improve this answer
1  
Something is missing. A filter registration maybe? :) –  toscho Oct 1 '12 at 17:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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