How to use multiple variables in query_posts?
-
I’ve created two author’s whose posts I only want ot show on specific pages, so I’m excluding them from other places. When I only had one author needing this, it worked fine with:
query_posts('posts_per_page=5&orderby=date&order=DESC&author=-20');I can’t find the right syntax to add the other, though. I’ve tried:
query_posts('posts_per_page=5&orderby=date&order=DESC&author=-20,-18');
query_posts('posts_per_page=5&orderby=date&order=DESC&author=-20,18');
query_posts('posts_per_page=5&orderby=date&order=DESC&author=-20,&author=-18');None seem to accomplish it. How can I get it to ignore two different author IDs?
The topic ‘How to use multiple variables in query_posts?’ is closed to new replies.