@Tiago ADPS
I believe that your problem is that you totally reset the query. You should keep existing query vars with something like
global $wp_query;
query_posts(array_merge($wp_query->query, array('category__not_in' => 23)));
@zofijeczka
As per forum rules, please don't pollute this thread and open a new one, as your question is not the same.