Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have posts of stores and restaurants in my area. Each post is marked by category of type (e.g. Restaurant, store) and town.

What I am trying to do is create a page for each town (with intro text and photos enter into the page ui) and then a loop of Posts in that town's category grouped by the other categories.

Ideally, I'd like to get the current page's slug, or last part of the url to use for the post query: as in "http://mysite.com/towns/mayberry" would display all posts in the mayberry category grouped by the other tags.

So my page is

Mayberry some content

Listings: Restaurants (in mayberry only) - item - item

Hotels (in mayberry only) - item - item

Is this possible?

share|improve this question
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.