This member asks about the best way to combine both static and dynamic pages or static and dynamic elements in a single site. We discuss what “static” means in WordPress. We also discuss how to have a completely static WordPress website. Then we discuss the Hybrid content type where some elements of the site are static and others are dynamic. We consider the topic of custom post types and custom taxonomies and look at an example.
Select the link below to watch a high definition version of this video
[S3VIDEO file=’public/liveanswers/LA1-23-11a-hybrid-site-structure.mp4′ bgimage=’https://www.byobwebsite.com/wp-content/uploads/2012/10/LA1-23-11a-hybrid-site-structure.jpg’ displaymode=’overlay’]
Member: Okay my query which I would like you to just comment on for everyone is… suppose I have to make a site for someone where it needs to be a CMS because they want to have 2 pages that say, that they can update themselves. Let’s say one of them is news items, which really is a blog I suppose, and let’s say the other page is events that are coming up. And they need to be able to update those themselves. I don’t have any right problem in known category at the moment in a Thesis site but let’s suppose that the site has lots of other pages as well, say you know, maybe 10-20 pages. Now I’m very familiar with creating a static site. I’m very ill at ease with anything that’s a dynamic sort of site some. Lead backing to me seems to be absolute hell. What philosophy would you recommend to implement a site like this which I try to really call a hybrid site? Are you with me?
Rick: Yes, absolutely.
Rick: Well and so, a hybrid part of this is the part where they have a News post or they want to put some news on their site and then later on, they’re going to put some more news and then in a few more days, they’re going to put some more news and that sort of thing. And so you have… I mean, if it’s a straight static site right… all they do is just type their next news item over the top of their old news item and they would you know, type their new event over the top of their old event. And so that’s the whole…that’s the non hybrid method, right? It’s the… they just use their content to… their content box to edit the text then change it and they don’t have any… and that’s just the system.
Now the alternative is that using WordPress to handle the categorization, the editing, and display of that information and so rather than getting on their static page and then just typing the news stuff, what they do is the would create a new post and they would type their news as a news item on a post and then they would have a page that displays their news items. So… and if this was… if the events were the kind of event where there was a lot of information, right… where there was a time and a place and you know, maybe some directions on how to get to the venue or you know, if there was a long description or anything other than you know, just a date and a time… if it was an event that needed a bunch of information associated with it, I would probably, myself, create that as a custom post type and I would have as a custom post type, an event and then every time they wanted to create a new event, they would just type in… they would just you know… well, actually, I’m sort of tongue-tied at the moment.
But I’m going to show you on my site here because that’s essentially what I have going on with Live Answers. If you can pretend for a moment that Live Answers is in fact a news item. What I have here is I have… Live Answers is a custom post site. I am going to… when I enter a new Live Answer you know, well first off, all of my Live Answers are in this you know, Live Answer list. It looks just like a post… a list of posts because that’s what it is… it’s a custom post. And if I’m going to add a new Live Answer then I select Add New and you know add the whole add new Live Answer thing comes up. And just like adding a new post or adding a new page and I would create that.
And then, if you… and then I have a page that… move my mouse over here somehow…and then I have a page that displays those Live Answers that you are in no doubt familiar with. This page here and the way I’ve chosen to display those Live Answers are as teasers but I wouldn’t have to do it that way. You could do it any different… any way you wanted to but in this case, the Live Answers are teasers and you just display each of your news items in sequence. So every time you type a news item, it ends up at the top or at the front of the list and so, every news item is… or every event in this case, I’m sorry…every event is a brand new post or a new custom post type. And then for your news items, you would use the regular post.
Now the reason why you don’t necessarily have to have a custom post, you could use posts with different tags or posts with different categories to control the display of those posts if you wanted to simply use posts for this task. And my site’s another example of that. You know, back for custom post types was easily done, that was a little over a year ago, I wanted all my videos to be individual posts. And so… rather than on their own page for example because I wanted to be able to control access to them you know, using lists that WordPress could automatically generate. They can’t do that from a post… I mean, they can’t do that from a page. And so I wanted each of these… each of my videos to be on a blog post but I didn’t want those blog posts to display. I didn’t want to…I’m sorry… I didn’t want them to display on the blog page. So when you’re on my blog page, you don’t see any specific video posts. You don’t get to see those video posts until you link off you know, specifically to one of those videos. And so this is blog post but because it’s tagged, this one in particular I think is tag as a public video… because this is tagged, it does not display in the blog itself. It only displays where I want it to display.
And so your News page could be just like the blog page where each news item is a blog post and each of those you know, the latest piece of news, ends up at the top and you know, eventually, you get down to the teaser news items from the past. And then each even could either be a custom post type as this Live Answers is or it could also be a post that is tagged say, it has the tag Live or a tag events and then the blog page would not display…would be set not to display events but you’d have another archive page that would display events only.