Jump to content
Sign in to follow this  

remove specific category from monthly archive

Recommended Posts

I've tried to recreate this by adding add_action('pagelines_before_theloop', 'archive_exclude'); function archive_exclude() { if(is_monthly()) { query_posts('cat=-38,-31,-32,-33,-37,-51&posts_per_page=20'); } } but when I do this, my monthly archives all show the same posts, despite the fact that they haven't all been published in the same month. I get the same behavior when I use is_archive() instead of is_month(). Do you have an idea of how to solve this?

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this