Category Pages – Organizing, Listing, Displaying

Category Pages: for example, trees on leoraw.com
For example, you can have a category page for trees. Each tree would have an image and title text. Yellow trees would link to a post about yellow trees. Green trees would discuss trees that are green.

Three clients have recent had me working (and thinking about) category pages. These are the pages that list every post within a certain category. So, for example, you might have a list of articles on a category page, and from this page, you can click and visit the post in that category.

In two cases the clients need staff listings. For one client, I created a custom content type – this gives you more control over how you enter all the information in the content form. Custom content types are very handy for having boxes of fields that will match your content. So, for example, there is a field for telephone, one for office and one for email.

As I wrote last spring and summer about images, perhaps I will have a series on category pages. Stay tuned for more this fall on this topic!

What is a Category Page?

When talking about WordPress, a category page is a page with links to all posts in a certain category. As an example, here is a category page on this blog for WordPress. WordPress themes provide the default category page, often seen as archive.php.

In Drupal, you can create and format a page that is a list of links to a certain content type, be it articles, stories or some custom content type. One would typically do this with Views. But as most of my readers are using WordPress, I will use the rest of this post to explain how one can create a custom category page with WordPress.

What Can One do to Customize a Category Page?

If we go back to my previous example, you will see on my WordPress Category Page that for each listing I have the title, the author of the post, an excerpt, links for the categories and tags of the posts and a thumbnail that floats to the right of the rest of the content. But that’s just one example. On my Sketching Out blog, if you look at my category page for recipes, you will note I have a painting at the top and tag links right below it. Then I have the recipe post listing as usual.

Back to the clients who need staff listings: basically, the category page will be a list of the staff. Ideally, it is nice to have photos of each staff member on the staff listing page. You will probably want the name as well. Then you have to decide what other information is most important: title? phone? email? Or is just the name and photo linked good enough?

Before getting into how to code a category page, here is yet one more example. I do try to write about New Jersey (where I live), especially Central New Jersey. On my category page for New Jersey, I have a sentence and a link to a page of New Jersey Twitter users.

What would you want to include on a category page? Something special at the top? A thumbnail image for each post? An excerpt? Let’s learn how in the next section.

How can one Customize a Category Page with WordPress?

This does involved some coding, but if you have a webmaster who can do coding, this is really some of the simplest coding there is. The way to make any changes to a category listing (without using a plugin) is taking the default, which is probably archive.php or category.php and bit of code to it. If you are afraid of code, just skip this section – you can either hire someone to do this or find a plugin that does the bit that you need.

If you want to change every category page, then make edits to category.php (if you aren’t using a theme specific to your site, you might want to make the category.php in what is called a child theme). If you just want to change one particular category, you could create a category-slug.php page (with the slug being the name of the category, with no capitalization). To find the slug for your category, go to your Dashboard and pick Posts->Categories. If you click on the edit link under the category that interests you, you will see the category slug. More on Category Templates on the WordPress Codex.

green trees - possible thumbnail for a post
Maybe a thumbnail for a post on green trees?
So here is an example of how to add a thumbnail image to every post on a category page. First, on every posts in your category, add a Featured Image. Make each image the same size for consistency. A good size for a thumbnail might be 100px wide by 100px high. Or maybe you want bigger: 200px wide by 150px high. The important point is choose one size and stick with it. So what then is the code to add the thumbnail to this page? If you scroll down on the Post Thumbnails page in the WordPress Codex, the first example has the code.

If you just want certain text at the top of a certain category page, you would just need to put the text at the top of the category-slug.php page before the loop that gets all the posts in that category begins. If you wanted to be able to edit the text yourself easily, then it gets a little trickier. Ask your webmaster to include that text in a post or in a custom content type; then you can edit it as you do other posts, pages or articles.

Over to You and Your Ideas and Reactions

This post is to get some ideas flowing about what one might do with the category pages. While there are some plugins, the first one I looked at had not been updated since May 2013 (that means do not use it – too old). Please know that custom category pages involve simple coding, so if you have specific ideas about what you need, for example, on a staff page, a good web developer should be able to write simple code to help you out (and best to do this to a child theme).

If you had the opportunity, what you would you add to a category page? A thumbnail? An excerpt? A special image at the top? Have you seen any interesting category pages?

Please share:Pin on PinterestTweet about this on TwitterShare on FacebookShare on Google+Share on LinkedIn

42 thoughts on “Category Pages – Organizing, Listing, Displaying

  1. I’ll be sharing this post with my website Leora. When you said, “if you are afraid of code,” yup, I skipped it! I do have categories and I find, or at least Google analytics tells me, some people use this. Thanks for this new slant on things.

  2. Hi Leora – I do use categories but not very well. This is something that I will be looking at the first of the year to correct. May need your help.

  3. You know, I let my web master do most of the back end stuff for my blog and website. I do know how to do thumbnails but now I have to check and see if category pages make sense for me. Thanks for sharing this. I am adding a new dimension to my business and they might just come in handy!

  4. For someone like me, who knows so little about social media and the internet, I enjoy reading blogs like these.
    Thanks for sharing, it has helped me immensely

  5. This is very interesting and timely for me as I have just had my website re-vamped and a category listing of my blog posts added to my website. It certainly does make things more visible and accessible.

  6. Because my blog is divided so clearly, I do use category pages on my site. I do think it is so much better than one big category and so much easier for readers to go right to what they are interested in. 🙂

  7. Leora- This is a great idea. I have category pages in my main set with images. I have category links within my blog site but I haven’t made a separate page for the categroy. I plan to pass this along to my graphic designer as I think this is a great idea.

  8. I’ve settled on five categories for my blog, though I have a couple of others that aren’t visible from the custom menu that I’ve created. I haven’t added any categories to my Arresting Imagery photography blog yet, but will become I get too many pictures. I probably will customize my category pages someday, but it won’t be for awhile. I have all sorts of ideas that would work for a great travel blog, I just need six more hours in each day.

  9. I have categories but never thought about category page, even not sure if it is possible on blogspot like wordpress.
    But it is nice to know about this and when I thought to update my blog then will look into this post again , so I have bookmarked this now.
    andleeb recently posted…A Way Out from Helplessness.My Profile

  10. I have always treated categories and category pages like parents of tags. In its most simple form I fashioned after a microsoft folder structure so that a kind of breadcrumb can be followed…kind of. I guess an Archives page is the closest thing I have to a Category page.

    1. Tim,

      An archive page is really like a category page … in fact, if your site doesn’t have category.php, it will look at archive.php. The archive pages covers all sorts of pages (by month, by year, by search, by tag, by author), but the category page is just for authors.

      I will probably write a post about tags, because no one knows they exist! I actually use tags for topics that are covered in several different categories. But your usage seems fine.

  11. What an excellent idea. I really like the idea of helping people find information based on areas of interest. The categories pages does a great job of that,something for me to consider for myself.

    We added tags to the materials on my association’s website so that if you look at one item, the related items are listed on the right.

  12. Hey Leora, I have labels which seem to correspond with categories on your post. I had not heard about category pages, but currently being on blogger it is probably not an option. Will migrate later on to wordpress.

  13. Hi Leora

    I have categories on my website although most of my blog posts go in more than one of them and are related to writing. I can see where for a business they would be even more important.

  14. Great ideas. I’m fortunate that the premium theme I invested in is so versatile because it came with a huge selection of page templates. I have a “Start Here” page of course, but then I also have an Image Gallery. The Image gallery is a collection of every post since the blog was started organized by category and showing the image used for each post. I’m a very visual person anyway so I just love this option. Thanks for the inspiration!

  15. This is really helpful Leora. I have a couple of pages that I update manually but they really should be category pages. I tried using the default category page in my WP theme, but I didn’t like how it showed up. This gives me a little more to think about…

    1. Meredith, you will find once you give up the manual in favor of the programmed category page (or other pages that can be programmed), you will say – why did I do it the other way for so long?

      Thank you for reading.

Please leave a comment.

Your email address will not be published. Required fields are marked *

CommentLuv badge