user1460854
user1460854

Reputation: 1

how to display posts from 2 categories (both at the same time) inside the archives page

Hi I have some links inside the archives page and I want to filter the content how can I create a link to give me posts from both categories category A and category B only. my working example is this http://myurl.com/?cat=39,38,-37,-29,-36,-4,-11,-6,-27,-30 but it's not seo friendly I want something like this http://myurl.com/?cat=39and38

Upvotes: 0

Views: 3682

Answers (2)

jeremy castelli
jeremy castelli

Reputation: 1260

you can simply do http://myurl.com/?cat=39,38 with only a coma, it works for me

It's maybe a bit late for you, but it can help others

Upvotes: 1

AriePutranto
AriePutranto

Reputation: 401

Best way to do that is to create and use a custom page template: http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates

Next in the custom page template, create a loop you want using query_posts(): http://codex.wordpress.org/Function_Reference/query_posts

Both links are a great place to start.

Back to your question: I think http://myurl.com/?cat=39&cat=38 will work, have you try it?

Upvotes: 1

Related Questions