Restrict a Wordpress browsing session to a specific category, based on user selection?
June 9, 2012 2:10 PM   Subscribe

Wordpress filter: Easy way to let the user pick the area of the site they're interested in, then restrict the rest of that browsing session to categories and sub-categories within that area?

So, we'd like for the user to be able to "pick your city," for instance, from either a drop-down or a hard link. Whatever works. But once they've made their selection, they only see content from the subcategories in that city (each city is a top-level category), as well as from the city's category itself.

Is there a plugin or an easy way to do this? Thanks in advance.
posted by jbickers to Computers & Internet (5 answers total) 1 user marked this as a favorite
Easiest way to start on something like this, that I can think of, would be via the plugin Types.
posted by steinsaltz at 2:49 PM on June 9, 2012

Simplest thing would be to have your page code retrieve based on a session variable, if set. If it's not you just show everything (or only show the code to select & set the session value). You'd only have to change this in The Loop, though depending on your other options that might still leave the things accessible via archives etc.
posted by phearlez at 3:28 PM on June 9, 2012

OK, but any specific suggestions on how you'd use Types to make this happen? Seems like a pretty open-ended tool (we've got it installed on the appropriate domain.)
posted by jbickers at 4:12 PM on June 9, 2012

(That was in reply to steinsaltz, btw)
posted by jbickers at 4:12 PM on June 9, 2012

It sounds to me like this would be something you'd do with Multisite WordPress. Each municipality could in actuality be its own blog. All individual blogs can share the same theme and be configured alike, but have the different content.
posted by artlung at 9:09 PM on June 9, 2012

« Older Best pay-as-you-go cell phone plan for a few days...   |   Awesome natural optical illusion/effect Newer »
This thread is closed to new comments.