content-types

Adding Human Readable Content Type to Node display in Drupal 7

Blog

In the mismash of my site's content, I have a bunch of different content types on the front page, and it isn't clear what posts are what type. I've been reading a lot of books, so there are more book reviews than blog posts, and come on, who wants to read all of those reviews (hint: not me, I'm writing them so that I don't read the books again because I forgot that I read them the first time). So, on my vacation, I decided to get to the niggly little things that annoy me in various systems. First up: human readable content types in the posts.

I'm talking about these things:

Okay, so, to do this, in your theme's template.php file, add a node preprocess hook function. You may already have one. Look for THEMENAME_preprocess_node.

Add these two lines: