Viewing 4 replies - 1 through 4 (of 4 total)
  • First go to archives.php file, find the loop ( while.. ) and place the following code right before it and right after inserting the category ID ( e.g 33: &cat=-33 ) :

    if (is_archive() && !is_paged() ) $posts = query_posts($query_string . '&cat=-ID');

    or only query_posts($query_string . '&cat=-ID'); since you are in the archives file..

    Thread Starter thief_pl

    (@thief_pl)

    ok, thanks

    is there anyway i can hide the month from the drop box if for example there is post only from that category..

    I assume if that code worked, and if a single archive contains only a post or more from the targeted category, there will be no count for that month, and I suspect if an archive is empty nothing would show.. Am I wrong ?

    Thread Starter thief_pl

    (@thief_pl)

    Hi, that didn’t work , is there anyway i can add some code to functions file??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How can i hide posts from one category from monthly archives?’ is closed to new replies.