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
Post a Comment