This is the question that led into a series of live lessons on using WordPress and Thesis as a Content Management System (CMS). This became the Community News Case Study we are creating a community news website. A member asked what the best way is for organizing his community based website. He was considering using either post categories to delineate the communities or using multi site with one blog per community. We then discussed:
- A short overview of a Multi-Site functionality
- How to use custom taxonomies to organize the site
- How to combine custom taxonomies and categories
- How to use category archives to show individual community “blogs”.
- Use of GD Custom Posts and Taxonomies Tools plug-in
Select the link below to watch a high definition version of this video
[S3VIDEO file=’public/liveanswers/LA1-23-11b-adding-custom-taxonomy.mp4′ bgimage=’https://www.byobwebsite.com/wp-content/uploads/2011/03/LA1-23-11b-adding-custom-taxonomy.jpg’ displaymode=’overlay’]
Case Study Part 1- Community News Site, Custom Taxonomy vs Custom Post Types
Case Study Part 2 – Community News Site, Setting Up the Test Site
Case Study Part 3 – Convert Posts to Custom Post Types
Case Study Part 4 – Configure Permalinks for Custom Post Types
Case Study Part 5 – Install and Configure Thesis
Case Study Part 6 – Listing Custom Post Types on the Appropriate Page
Case Study Part 7 – Community News Site Future Refinements
Case Study Part 8 – Add Thesis Meta to Custom Post Types
Case Study Part 9 – Display Custom Post Types by Category
Case Study Part 10 – Create Category Display Order
Community News Case Study – Part 11 – Add Event Information as Custom Post Meta to Events
Community News Case Study – Part 12 – Create a Page with a Custom Loop to Display the Events Sorted by Date
Community News Case Study – Part 13 – Display Event Date on Teasers
Community News Case Study – Part 14 – Show Only Upcoming Events
Community News Case Study – Part 15 – Format the Display of the Date
Community News Case Study – Part 16 – Display Event Venue
Rick: Okay so the question seems kind of complicated so I’m just going to let you ask it again.
Doug: Okay I’m just sort of getting started on this site that would be a community news site and I’m trying to figure out the best way to structure it and what I’d like to do is have one…it doesn’t have to be any homepage so much. It doesn’t have to be where people begin but it would be a place where things are collected. So basically, it’s 5 different neighborhoods that are… where people are blogging from or in a different category for content, same place where things can be collected but also, on separate pages for each of the different neighborhoods. So it’s 5 different neighborhoods and they are on the same database. I was thinking of using categories for being able to separate out one neighborhood from another. But rather than making pages for each of the different neighborhoods and then trying to post… and learn how to do that in php and make it the same as those pages… or under those pages. I think there’s a way to do that but I think it’s complicated. It has different front pages. Does that make sense?
Rick: Well, it does make sense. You could certainly could you know, there is a way in which WordPress multiuser site might be a good choice here but if you are going to keep it in one site then… I said multiuser. I didn’t mean multiuser, I meant multisite. If you’re going to keep it as one site then you might add what’s called a custom taxonomy. So you use categories like you would normally use categories so it could be you know, it could be events and you know, notes for families or you know… I mean, however you would think of each individual neighborhoods being categorized. You could keep those categories as categories rather than using categories to delineate neighborhoods. You could delineate neighborhoods with the custom taxonomy and then you could have either multiple blog pages, right? One blog page per community that would display all of the posts from that taxonomy or you could have…if it’s not a blog page, it could be an archive page. Again, the same thing… all of the posts with that taxonomy and you could have different lists for each category you know, inside that page. Displaying groups…if you don’t use a custom taxonomy, displaying all of the posts in a given category say, a category Palm Springs, if you divide it above your posts by… if the categories were your cities or your neighborhoods and you have Palm Springs and Seattle you know, Washington DC as your 3 cities… so you have 3 categories. It would be… WordPress automatically creates pages for each of those categories that lists all the posts in those categories. That’s called a category archive page and that is the default behavior. So not only is it not complicated, it’s actually very easy. And Thesis makes it easier for you to customize it so you could you know, easily add other stuff to your category archive page and still use WordPress’ default behavior for category archives.
Doug: I think the page…
Rick: Okay, go ahead.
Doug: I think the pages… I would be able to do something like individualized headers or other information that would be specific to those neighborhoods. That might be a bit more difficult if they’re category pages.
Rick: Well, like I said, Thesis makes it easier for you to do that for category pages. So it is… I mean, if you just look at it here on my website, I have lots of categories. But if you go to posts and go to categories, and if we just look at the Live Answers category for a moment… you know, this gives you an opportunity…these are all Thesis-related stuff. So you can add a meta title and meta description and you can add introductory headline and introductory content. And there are even hooks inside of this where you could hook other you know, blocks of code to this specific you know, byob Live Answers category. And so, this introductory headline and introductory content are you know, don’t exist in other themes. This is a Thesis-specific thing that you can add on to your category pages. Now, if it’s not sophisticated enough… if you want to do more than this then you could use a page instead of a category archive page.
You could use a page and use a custom loop and that’s what you would do if you were using custom taxonomies because as easy as this is, I wouldn’t do the communities as categories. I would do the communities as a custom taxonomy which is essentially, another method of categorizing and I would call that custom taxonomy you know, community. You can see that on my site I have myself a custom taxonomy called Video Availability. And Video Availability has you know, only 4 choices. They’re either free… it has a none choice, a premium or a public. And then when I am doing a post, when I’m writing a post… the posts… or we’ll just look at this post for example. Because of the way WordPress deals with custom taxonomies, it adds this little box here for that taxonomy called Video Availability and I can choose you know, none or free or premium or public. And actually, isn’t a video at all so it stays at none. But then I can use my regular categories for categorizing the post and tags as well for tagging the post. And this extra level of organization comes from he custom taxonomy. Now, there is a plugin…
Doug: The taxonomy…
Rick: The custom taxonomy is Video Availability.
Doug: How did you get that to show up… was there a plugin or is that a…
Rick: No, I wrote the code to create this custom taxonomy. If you are biding in to learning how to add this kind of code then that’s an excellent skill to teach or to learn. And if you were… if you posted this question on the forum, I would add code to the forum for you to look at that you could use to create the custom taxonomy community. But if you don’t want to do the code…if you don’t think of yourself as diving into the code then if you go to WordPress… I’m going to show you the plugin. Since I’m out of town, I’m working a laptop and nothing is quite the same on my laptop. Plugins and then let’s see, custom taxonomy… yeah, this is a view of view the custom post and taxonomy tools. If you lose this plugin, there is you know, a very simple system for adding taxonomies and saying what those taxonomies apply to. And then once you use this system, it automatically creates those boxes for you. And the thing about taxonomies is that once you create it, you can uninstall this plugin and the taxonomy would stay there because it’s a WP… it’s a setting in the WP options table and that’s not a plugin. And so even if the plugin code wasn’t there anymore, the setting is in the options and so it would still continue to collect that data. It would still continue to return the menu for you and when you set it, it would still store that data associated with that post because the custom taxonomy system is now a part of WordPress core. And so the only reason… the only purpose for this taxonomy system is just to… or this taxonomy plugin is to allow you to you know, write your own custom taxonomy without having to write any php. But if you want to learn php or if you were playing on php then by all means, you know, post something about it on the forum and I will give you some code that you can look at that will work for that for you.
Doug: Excellent, okay.
Rick: And you can easily make it you know, a drop down list so that the number of communities is fixed or it can be like tags where people can do their own community names and you don’t have a fixed list. It’s entirely up to you how you want to configure it. It also seems to me like because of what you’re… I mean, this is the way I would do it. I would definitely do it with the custom taxonomy and because of that, you’re going to need some custom loops to add to your page because you’re no longer going to be using the category archive page to display the community post. Now, you have a taxonomy archive page to display the community post and at that point, it does make sense probably to do that on a page and then you use some custom loops to select categories within the taxonomy to display, right? Like upcoming events as a category and then you’d have a list of all those events and then you could have you know… I don’t know, news you can use as another category. Something like that. All of these things in the same taxonomy but they’re all displayed differently on this one page. And I’ll be happy to work with you on the forum with that code so that you can you know, use this custom loops to develop… to get this information.
You may not realize this but what you’re talking about doing is part of my plan for developing a case study of byob. Just like I’ve done the Build AneCommerceWebsite, I’m in the process of developing a series for building a content management system website and the end result of the content management system website is a community site that has you know, news and events and all that kind of stuff associated with it. And so, I mean, it’s perfectly timed question… maybe a little early because the work isn’t done in advanced for you to be able to benefit from but I’d be happy to you know, help you along the way as you work on that. Because it’s going to easily tie in to the stuff I’m going to be doing over the next 7 to 9 months as I’m working up this new system.
Doug: Okay, well thanks so much. Yeah, I’ll probably make use of that.
Rick: Okay. So post on the forum, I’ll give you some code and then keep on coming back with questions and posting follow up questions on the forum and we’ll get it done.
Doug: Very good. Thanks Rick, have a good evening.
Rick: You’re welcome, Doug.