php - Filter out categories in wordpress -


I was wondering how can I not post in a certain category.

I tried

  query_posts ('post_status = publish & post_type = post & category! = Books and offset = 5');  

So I'm trying to get all those published posts which are not in category books, and then I have offset of 5.

Thank you, Matt Muller

You need to use - {$ category_id }

  $ cat = get_category_by_slug ('category'); Query_posts ("cat = - {$ cat & gt; term_id} & offset = 5");  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -