As I was working through the post and taxonomy chapter in Professional WordPress Plugin Development and checking out the new post formats feature for WordPress, a light bulb turned on in my head. I wanted to change how we think about news themes.
One of the things I hate the most about news or magazine themes for WordPress are their extensive options pages to handle the front page of the site. I’ve always thought this could be more flexible and more intuitive for the end user.
The idea is to use a custom taxonomy to handle the display of things on the front page of the site.
A typical news theme layout
Before getting any deeper into this subject, take a look at the following image. It is an example of what the front page of a news theme might look like. I’ll use this as an example throughout the rest of the article.
The current state of news themes
In the image from the previous section, there are three front page areas: feature, images, and column. Generally, news themes have a settings page that allows you to select a category to display posts in specific areas on the front page. So, you would most likely select a category for each of those sections.
What this means is that you typically have to create a “feature” category to handle your featured posts and maybe even create new categories for the other sections. Other themes just have variations of this basic idea.
This is poor design and doesn’t make for a great user experience. It doesn’t put the power in the user’s hands.
Using a taxonomy instead of a settings page
Rather than having a settings page to control which categories and so on fit within certain blocks on the front page, consider using a custom taxonomy. This way, the user can select where a post would appear while writing the post itself. This seems to make more sense from the user’s perspective. And, it doesn’t force users to use categories to determine how their site content is displayed.
The following screenshot is an example of what this could look like on the post editing screen.
You could even make this custom taxonomy public, allowing for featured post archives, nav menu items, and so on. There’s plenty of room for innovation in this area.
What do you think?
If you’re an end user, does this type of system make more sense to you? Or, do you prefer a theme settings page in which you must select a specific category to handle the display of the front page?
As a theme developer, do you think this system would work better? If so, what types of areas do you think would be standard in news themes (I’d like to come up with a good default list)?
I welcome alternative ideas too. I haven’t seen a whole lot of innovation in this area in the past couple of years.
I like this idea, but mostly because it gives the user the power to *not* use a category to select featured posts. My biggest complaint with custom themes that utilize custom areas (news themes, portfolio themes, etc) is that they clutter up the category list with “special” categories for featured items, imported Twitter posts, and the like.
Using a custom taxonomy definitely makes it cleaner. You only have to select something other than “Default” when you really need it.
This makes a lot of sense, especially with multiple feature areas in a theme. I hope that with these new/easier ways to affect the admin UI, we start seeing more end user -centric theme development. The tools make sense from either side… so, I’m thinking win-win for developers and users.
User-centric theme development: That makes for a good catchphrase.
User-centric is definitely one of the key ideas here, and I’m a big fan of that.
One concern would be what one of the other commentators here brought up…would this allow a way for users to select existing posts to be applied to this custom taxonomy?
I think from a user’s standpoint, especially those that are new to adding content to WP, this would make the learning/training curve that much easier.
Speaking of that, it would also be a nice option to have the ability to create these custom taxonomies through an admin interface…or maybe that already exists:)
I’d almost want to say that maybe Post Formats would be how you’d handle this but since those aren’t extendable it’s probably better this way.
I don’t have a problem with featured categories, as they stand today, but I think this way would work too. It’s a pretty cool and functional alternative 🙂
This is a bit outside the scope of post formats, but the general ideas are definitely similar. The idea is to add some metadata on a post-by-post basis for controlling how posts are displayed on the front end.
I could take it or leave it.
Your suggestion is definitely easier for the end user to setup. They wouldn’t be required to create categories. But I think it comes down to user preference. If the categories are already established, great! If not, your suggestion would help the users who don’t quite understand category creation.
As always, thanks for stirring the pot and keeping discussion going on how to better expand WP.
That is a really good idea. Taxonomies keep things in the background and you aren’t limited by a category. I see no reason why this needs to be limited to news themes, but I see why you’d use it as an example.
I think it could be a nice solution to overloaded options pages on any theme with a feature template.
I could even imagine it being used in conjunction with a “Feature” post type where the Feature custom post type allows the user to create content blocks for say, a business theme, and that way the site content doesn’t have to be created with pages / posts / widgets, but rather with custom post types that are called by the custom taxonomies to certain sections of a template.
Nice post!
A featured post type can definitely be a good way to go for certain niches, especially for something like an online store. You’d have a featured area that showed the latest products.
Eureka! Great idea. This method will separate content and presentation even more. Categories should be used to categorize posts. In some front page design categories are all I need. But this idea would be helful if I want to add -for example- an ‘Editor’s choice’ area and when I’m not planning to use this as a category for archiving my content.
Well, since categories are a taxonomy, it’s a little bit of a cheat. BUT, since it’s a separate taxonomy, it does have advantages. It’s orthogonal to your regular categories, so you don’t muddle things.
An idea I had kicking around in the back of my brain for a while was to use tags for something like this. But again, I would have been mixing in ‘control’ metadata with ‘categorization’ metadata, which isn’t as clean as putting it in a separate taxonomy.
I’ve used tags and categories in the past, even the option to use multiple tags and/or categories. Users still end up wanting more flexibility though.
For me, it’s not so much a category vs. custom taxonomy thing though. It has more to do with the user experience. Mostly, I just hate theme settings pages and am always trying to think of ways of getting out of coding them.
I agree part with Dougal, categories are a taxonomy. I like that it is separate from the categories throughout the site, and that it could add another “dimension” to organizing content.
What about doing something to extend the sticky functionality. Maybe there could be sub-types of sticky posts? I’m not sure about the inner workings for sticky posts, but seems like it could be an option as well, of course then end users would have to understand sticky too.
Another way I’ve seen this special home page set up is with a widget area. Then we don’t need a setting in the theme options for what to display where, but it’s just a widget displaying posts from a certain -category/tax. But then you rely on users not breaking the home page by removing a widget.
Widget areas can be useful for some types of themes, especially when allowing custom content. It depends on what the purpose of the widget area is. But, using a widget to select a category/taxonomy to display posts isn’t much different than using a settings page. It just moves the settings to a different place.
Sticky posts are saved as array of post IDs in the
wp_options
table. One could certainly use that same idea to do accomplish the same thing. I’d just prefer to save it as post metadata or attach a term to the post.I like the idea. I’m currently using the WP3’s Menus and custom walkers to organize where post content shows up on the homepage and sidebars.
I’ve actually implemented something like this in my themes to tag featured content for an area on the homepage, instead of setting up a “featured” category. Hadn’t thought of extending this into other areas of the page. Would allow for much more flexibility of scheduling content for different areas, basically allowing for a mixture of content.
I like this implementation a lot and think it’s actually necessary if the site is going to updated by a non-developer. From a user’s perspective, separating this functionality from the default categories will definitely result in a lot less confusion and reduce the mistakes that come from trying to cram it all under the default categories taxonomy.
Also, Jan is on the money when he says, “This method will separate content and presentation even more. Categories should be used to categorize posts.”
As designers and developers, we need to ensure that the admin UI is just as intuitive and explicit for our clients as the site’s themselves.
The designer in me, especially the database designer, much prefers this approach. However, I wonder whether users will like it. The WordPress Admin is terribly overcluttered as it is and has dreadful usability. Using Category is transparent to the user: this approach means yet another entry the user needs to think about and another box cluttering up post entry.
The idea is right, but it highlights that the Admin dashboard of WordPress is now far and away one of its weakest areas and is in desperate need of a revamp so that something easy can be presented to editors who aren’t admins. For sure there are plugins which can help, but it is something we are going to need in the core. So yes, your approach is right but whether now is the right time for the idea, I am less sure as maybe an admin redesign of core is needed first.
I’ve never thought of using categories in this way. But as a custom theme developer, I’ve found my way on this issue through using custom fields in various ways.
At the moment I’m focussed on a plugin, which is still in beta, but provides themes developers with an easy kind of API for creating and managing custom fields. I would add custom fields to the home page (and landing pages) for the selection of featured items.
This gives you the scope to separate the publication of posts or pages from the selection of what’s going to be featured at any given time on a landing / home page.
I think the Holy Grail here is getting the functionality working both ways, e.g. you define a custom field on the home page for selecting featured items, but that same definition automatically creates the ability (for those with permission) to select, while editing items (post, pages, whatever), whether that item is featured on the home page or not. When I get time, this is high on my “to-do” list for the Custom Fields plugin!
Justin, I’m developing this plugin very much with your Members plugin in mind, in terms of who has the capability to select what gets done. If you’re interested, I’d love to know what you make of it, especially in relation to this issue.
I think from a design perspective this is a very good feature for news type sites. A taxonomy that is relevant for the front page (politics, business, sports, opinion, etc.) doesn’t track one to one.
BTW – can anybody recommend a solid theme with a nice front page like this? Here is my situation, a statewide non-profit. I would like the front page to be broken into sections with each section containing posts from a single chapter (houston, dallas, austin, san antonio) along with a featured section and a couple of other sections. I have tried using producer (http://www.antisocialmediallc.com/producer-theme/) but have problems with its consistency (I am an end user not a theme builder). I don’t have a problem paying for the theme, mostly I don’t want to use their money to purchase something that won’t add value to their group.
Agreed, custom post types make total sense from a user’s perspective. I also like Evan’s approach bringing widgets to the front-page. Been fiddling with a query-widget lately that would allow an editor to insert arbitrary query-calls on the front-page like displaying the 1st post from “Sports”, 3 posts from “CategoryX” etc.. It’s still in pre-alpha, but there’s probably another one for the same purpose out there anyway. 😉
Really love this idea, but how do you make the terms use radios instead of checkboxes?
You have to create a custom meta box to use radio selectors instead of checkboxes.
Hey Justin,
I would really like to do this. Actually, I’d like to strip the meta box down to a title, description, and 1 checkbox for “featured on front page”. Any recommendations for methods and/or resources to do this? I consider you to be my favorite WordPress dev standards source! Thanks.
This method is particularly useful for sites which have multiple users with different editing permissions. This way I can give control over what goes where on the front page to the editors who have that control, and leave categories ‘clean’ and available to other editors.
This is precisely what I was thinking and one of the reasons I focused on news themes. Typically, you’d use a news theme on, well, a news site, which would most likely have multiple authors, editors, administrators, and so on. It makes sense to have certain users assigned to handling what shows up on the front page or where something shows up.
Until you mentioned it Justin I had never even given it a thought, now I can’t get the idea out my head (but all is good, it’s giving me plenty of things to consider!) The use of Custom Taxonomies to replace a Theme Options/Settings page is right up my street, purely and simply because I’m not a major fan!
Taking into account what a few other people mentioned about Categories and Tags, who cares if they are Taxonomies too, (maybe I’m wrong here) but they all function for what they were created for (if that makes sense to anyone?) — What I’m trying to say is that Categories were implemented to divide your content into different topics, and Tags for dividing your content up in a different way, isn’t that what you’re on about here too? 😀 I’m not even sure I understand myself here TBH!
I’d love to see Commercial Themers take the concept, and implement it into their own Themes, I know depending on the site I was creating I’d go down the route you talked about above. So if anything Justin, thanks for the idea!
Justin – as always an interesting perspective. I do a-lot of bespoke CMS style theme design for WordPress, the slight feature/issue with the technique you mention (and ‘category’ technique) is that you don’t always want the posts available/getting indexed through taxonomy query – using the controls for pure CMS purposes.
I agree that custom taxonomies can be used in clever ways to display content (which is actually my preferred method too, you get great core admin) but if you want to lock out taxonomy feeds/queries so this stuff remains only available in correct categories etc I’d advise just simple ol’ custom fields.
Also, let’s not forget ‘sticky’ – it’s core code and sadly neglected;( With the right little custom loop it’s easy to display a category and 4 sticky posts for instance!
You highlighted a great principle of CMS architecture in WordPress, but people should not forget the rest – it depends what you want to achieve for the given site.
Keep up the good work and all the best with the book!
You can make a non-public taxonomy, which wouldn’t have the issues related to term archives, feeds, and so on.
Of course, custom fields will work as well. The idea is about saving the data as post metadata vs. a theme settings page and how it works from a user perspective. Custom fields or taxonomies would work in pretty much the same way in the above scenario.
This clutters up the blog page with sticky posts. But, if you know the user won’t have a blog page, it’ll work great for one section. I deal more in general public themes, so this really isn’t an option for me.
Actually, I wouldn’t mind any of the two methods. I guess both would work for me. However, I’d go with the custom taxonomy option as it would give me more flexibility.
At the end of the day custom taxonomies are still a way for categorizing content, just like categories, right?
Great post Justin. Most news/magazine themes have multiple column areas, so I think there will be more types like Colum One, Colum Two etc.
I’ve questions about UI, I know that by default custom taxonomies UI uses checkbox type for input, but you have radio type, is there any option to change checkbox to radio in WordPress?
No, WordPress doesn’t have an option to change the term selector. By default, it uses checkboxes for hierarchical taxonomies and a text input box for non-hierarchical taxonomies. You have to roll your own meta box, which really isn’t that tough.
Definitely an idea worth exploring. I’m not a huge fan of relying on Categories for layout purposes and from a user perspective this does seem to be more intuitive.
I see this as a *potentially* good thing. New taxonomies, and other forms of meta-data, are a good thing. However if the implementation ties them directly to the theme, as opposed just just a plugin that certain themes target, then it is bad.
Using categories for presentation configuration is poor design, but so is tightly coupling the presentation meta-data to the theme. Assume for a second you have a theme with a custom taxonomy to control the presentation, and you desire to change your theme to one of theme A, B, or C, each of which implement their own custom taxonomy though ultimately offer a similar layout to what you have. Part of the transition then includes some sort of data mapping and subsequent data conversion and validation effort across a potentially very large data-set.
If all these themes instead relied on a common underlying plugin (or perhaps a future WP built-in) that handled the storage and configuration of the taxonomy, then you only have to worry about the data mapping, not data conversion (or at least not for the same reasons), and can be handled succinctly in a theme config page much like they currently do where they map categories rather than some other taxonomy.
Did a little homework, and I’m now thinking that you implied using the built-in WP custom taxonomy architecture to accomplish this, which is certainly a step in the right direction. However, I would still advocate that the theme itself stay away from defining or managing any such taxonomy, and that a separate plugin for taxonomy management be developed (and/or included in future versions of WP).
To that end, the theme should allow an admin to select a taxonomy to map to and then choose classifications within that taxonomy to map. After all, both “Categories” and “Tags” are technically valid taxonomies to use for presentation, even if their description is vague and their purpose is only understood as a common practice within the community and taken on faith. If an admin sees fit to forgo the standard use of those taxonomies and chase after his own purposes, why should a theme get in his way of doing so by demanding the use of a custom taxonomy (let alone one that the theme assumes nothing else could possibly care about)?
I mentioned in the above post that I’d like to see some ideas for a default, standard list. For theme-to-theme portability, you’ll never truly get that unless it’s something built into core. Even then, that solution would have its own set of issues.
A central plugin or guideline on the usage would be handy for publicly-available themes. For custom theme projects, well, they’re custom.
That’s a good idea if a user can control the creation of the terms of the taxonomy. We could standardize on a
post_presentation
taxonomy. The user would then create his preferred terms for the taxonomy. The theme could allow the user to map those terms to the presentation.Categories and tags are not valid taxonomies to use for presentation in publicly-available (general use) themes. As theme authors, we can’t make assumptions that users want to use these taxonomies outside of their intended purposes. This is one of the reasons we see post formats being added into core in WordPress 3.1 (people were using the “gallery” and “aside” categories for presentation).
Obviously, if users wanted to do that on their own, they have the option to run their site however they want, but that’s outside the scope of the discussion.
This is actually about a much more fundamental issue of the approach that web developers take when using WordPress to develop websites and themes, it applies to much more than just news themes:
It’s all too easy to slip into a mentality of taking lazy UI design decisions based on WordPress’ existing way of doing things, then saying “How can I explain this to the end users?”
My preferred approach has always been to design firstly for the users’ needs, and then figure out how to adapt WordPress to do it for them with maximum usability. It requires more thinking, planning and coding, but the end results are always far better in terms of usability, so the user is much less likely to mess things up.
Choosing a category buried deep within a list of other completely non-related categories might seem obvious to a nerdy developer, but is completely non-intuitive for the end user. Having a separate, clearly labelled meta box, custom designed for a particular taxonomy or post type, has always worked far better in my experience.
I´ve been studying about themes, and most users don´t want spend time reading how to use a theme. Even custom fields are still a mystrey to most of them.
I don´t know if this is right but I’m using tags instead categories for display posts in special areas. When the post get older, the user just remove the tag. The categories don´t get messed, we can assign the same tag to any post anytime etc. I just don´t know how to do this without custom queries 🙁
I was thinking, could be like the WordPress menu feature, where user can create blocks and what to show there (which categories, order, number etc), the theme developer code the areas, just like the menus works.
Sorry for bad english, Justin!
I’ve tried a variety of themes, but for now there are settings that do not match,, I am confused what to do
At first your article seemed like you had found an alternative to categories, but doesn’t your solution use categories?
It seems your solution is a presentation issue, though I realize it changes the underlying coding job.
I’ve been thinking of having a layout that is a bit more complex than the one you present. I’d like to have several areas that each show post from a specific category. like someone mentioned; news, sports, entertainment etc. In that block I’d show either a list of posts from that category or the latest plus a few. Would your system be easier/harder/same to implement this format?
The post above actually has little to do with categories, but folks keep focusing on that aspect of the post. Category is just an example. The discussion at hand is about creating a system so that users can select where individual posts appear on the front page rather than selecting an overall set (by category, tag, author, date, etc.) of posts to only appear in one section. This could be done by a custom taxonomy, post metadata, or even a site option.
If you’re wanting to build something using categories, it’s outside the scope of the solution I proposed.
I think your approach could work in certain circumstances, but there’s one major problem: too often you’d just be building a taxonomy on top of a taxonomy.
People running news themes don’t normally stick random posts in random places. If I have a site that has five categories — politics, entertainment, sports, international, and opinion — it’d be very common and logical for me to want the homepage to have different sections for each of them. I’m not talking about “Featured” or “Top Stories” categories, I’m talking categories done right.
So I’d write a new post, I’d stick it in the Entertainment category…and then in order to actually put it in the homepage’s entertainment category, I’d also have to tick off “Bottom Center Column” or wherever in the Front Page Areas box. Just like I’d have to do for all the entertainment posts. It’s a needless extra step.
How about this:
I think something similar to the new custom menu UI would be much better suited to customizing homepages. The idea of creating menus and assigning them to menu locations works perfectly for homepages too — you’d just be creating “homepage modules” and assigning them to “homepage locations.”
On thing it would need that the custom menu UI doesn’t have: better automation. Yes, you could hand-tweak each module, but there could also be a set of rules you could specify for them to display certain posts automatically. Picture right under the name of the menu a “Rules” button that would expand and show the options from your Query Posts widget.
Great idea, thanks for sharing it 🙂
I have always used a category to display the Featured posts, but this makes more sense. Not only it will be easier for users so set, but this approach will require less explanations in the documentation.
This is exactly the kind of thing I am working on right now. My site is a multiuser magazine site and I am trying to use costume taxonomies to be able to feature a post from a subdirectory page (controlled by various bloggers) on the home page. but I don’t want it to literally duplicate the post just for it to show up on both pages. in other words I want it to have only one set of comments and only show up once to search engines and rss readers. I also want site wide search; so if I search for a subject on the home page it will find entries from the subdirectory pages and vise versa.
I’ve started the switch over from using a tag for features to using a custom taxonomy.
In WooThemes I see them using custom post types for layout (in their business themes, at least). This doesn’t really apply here as stories being featured still need to be in the ‘flow’ with the rest of the news.
I’m working with small town newspaper websites, however, and am debating about Obituaries. They have special field requirements, special layout, special sorting, special sidebars, separate search results, you name it – they stand apart from the news.
Do you think they warrant a custom post type? What would be your criteria, your thought process for deciding?
It was really a worth exploring idea . I’m not a huge fan of relying on Categories for layout purposes and from a user perspective this does seem to be more intuitive. I prefer to that themes which included tags and also flexibility for edits and cost of future expansion for new segments and/or news programs….
I kinda like this idea, but you would still need something in the theme panel for those who are installing the theme for the first time and already have hundreds of pages.
I always implement custom taxonomies for this purpose in sites I build since WordPress added better UI support for custom taxonomies.
The default taxonomies (Categories and Tags) are essentially for filing your posts into logical categories and archives.
I think that selecting a display area for a posts to show warrants a different taxonomy and makes much more sense to the user in the admin.
For example, I usually create a ‘display’ taxonomy with options like ‘Featured’, ‘On Home Page’, ‘News Ticker’ etc
I’m usually provide these options as checkboxes (using the default WordPress taxonomy API) as quite often you may want a post to show in a Featured section and in a News Ticker.
I’m trying to do a similar modification to Hybrid news theme, on order to provide a newsticker widget based on custom taxonomy, and to provide more flexibility to the home slider posts choice.
My “issue” is that I can’t find a versatile plugin for the newsticker, and I’m considering the opportunity to develop one by myself.
Before starting any development, have you already published a plugin for this “display area” functionnality or a tutorial explaining roughly how you do this?
Justin, this post has given me such an “ah-ha!” moment. It seems so obvious yet I wouldn’t have though of it. Mainly because I’ve only really thought of a custom taxonomy as an extension of a custom post type – a way to organise portfolio items into categories, for one example.
I’m with you on the option page thing. I don’t like to stuff a bunch of input fields into an option page as a way to store content. It seems so much more intuitive to create a taxonomy with a checkbox for each section of the page. I’ve always hated the idea of creating a bunch of categories for organising content – not least because the user would then need to create these same categories as well and be careful to spell them correctly. And then there’s the issue of excluding certain posts when they’re being pulled in as a set. With a custom taxonomy the user can place each piece of content (post) on the page as they’re creating it, which is extremely flexible.
Cheers for sharing this, Justin.
THis brings up a good point – having the theme itself control the backend UI. I need to get into the backend meta boxes and such but its the same with CPT, and taxonomies – the user is then stuck with MY theme, I have no idea what happens to the content in CPTs if the theme is deactivated? And they would loose their familiar UI if the theme is changed to another. Themes seem to be getting into very plugin-ish territory which limits the user. THoughts on how this is going to work in the future? I thought themes were for the ‘styles’ and the code was supposed to go in plugins?
Custom post types shouldn’t be in themes at all. That’d lock the user into using that theme forever.
This post is specific to the presentation of content (i.e., styles), which is very much theme territory. However, I’d still like to see some more standardization on this idea or a better idea to make it more portable between themes. In general, this is no more portable than individual theme settings. But, with a little adoption, it’d be much more portable.
Hello, I am new at wordpress, so having a little problem, I installed the News theme
for my site everything looks fine me except the featured post slider, the slider is not showing on the home page and I did not find any option in theme’s settings.
Anyone please please tell me step by step how get the slider as I dont know much
about wordpress.
My website: http://toponthelist.info
Thank you very much.
Please ask all support questions for the News theme on its support forum.
My pal recommended I would personally quite possibly this way web page. They once were absolutely suitable. This kind of upload basically manufactured my personal working day. You cannot visualize exactly how a whole lot time period I did used with this data! Thank you!