Self-confessed Starbucks addict from the suburbs of Chicago.

How to Create a Blog Page with a Single Category

Single Category Blog Page

Maybe you’re a publisher for an online newspaper or magazine – or if you’re like me, just a regular guy who likes to have a number of categories for his blog.

Either way, there’s a really neat feature we’ve placed inside the Blog Page template of the Genesis Framework that many folks don’t know exists.

Blog Page Settings

You might think that the Blog Page options on the Theme Settings page is somewhat limited. There you have the option to select either “All Categories” or a single category to be used on your blog page.

Here’s a screenshot which shows the Blog Page settings:

Blog Page Settings

The question that you’re probably thinking is this – “What happens if I want to publish blog pages for each category that I have on my blog?”

As it appears, the Blog Page template can either be used to show all categories or just one – but looks are deceiving as there’s a way to create multiple instances of a blog page which showcases single categories.

Ok, this is really something easy to do – so follow the steps below carefully.

What’s Your Category ID?

The first thing you will want to do is identify what the category ID is of the category you want to use for your blog page. There are two ways to do that:

Option 1 – Download and activate the Reveal IDs plugin for WordPress.

Option 2 – Go to the Posts > Categories screen in your dashboard and edit the category. When you’re on the edit categories screen, take a look at your browser address bar and you’ll see something like this (note the part in bold):

…edit-tags.php?action=edit&taxonomy=category&tag_ID=1&post_type=post

Create Your Blog Page

Next, you’ll want to add a new page – be sure to select the Blog Page template from the Page Attributes box on the right hand side of your screen.

After you’ve done that, scroll down the screen below the post editor and you’ll see a box called “Custom Fields”.

Add a new custom field, using query_args as the name, and then type cat=1 as the value. (or replace 1 with the category ID you want to use for your blog page)

Here’s how that should look:

Blog Page Custom Fields

Publish Your Blog Page

Go ahead – click Publish and then check out your blog page!

If you want to create multiple blog pages using single categories simply rinse and repeat. I’ve used this same process for the Tutorials page here on my site.

This is a great way for sites with many topics or channels to have individual blog pages for each one.

Neat stuff, eh?

Comments

  1. John Cameron says:

    Looks like the solution for a problem coming up this week. Rinse and repeat. Got it.
    Suspect it will be great timing for others as well. Thanks, Brian.

    • You’re more than welcome John – it’s pretty safe to assume that I’m not the only person who does custom things with Genesis here on my site. That being said, it’s easy for me to write out the things that I do, so that others can benefit.

  2. Travis Smith says:

    The one exception to this tutorial is if a person sets Exclude the following Category IDs: to an ID of 1 on the Genesis > Theme Settings page to exclude Category 1 from the blog hoping to create it’s own page easily, then this method won’t work. This method assumes that all the categories are part of the blog page.

  3. Brian Bourn says:

    Perfect timing on this. I think this solution for sorting content will be easier for our clients than using custom post types. Thanks.

  4. Gita Street says:

    Very useful stuff. Thanks.

    I was wondering about those ID’s. Didn’t know there was a plugin for that.

    Very neat blog too. Looking forward to when we can download and tweak that one as well :-)

  5. Larry says:

    What are the benefits or advantages of using a “Blog Page” for different categories as compared to using the WordPress category tempate itself with post excerpts and a custom menu for access?

  6. Keith Davis says:

    One to store away for future use.
    Appreciate the Genesis tips.

  7. Here’s a question for ya… What if you wanted to add a custom intro just above the page.

    So take your “Tutorials” page – what if you wanted to add a paragraph of text right above the blog posts as a way to welcome readers to the type of content published on that page.

    Hooks? Or can this be done via custom fields when you’re publishing the category page in the format you described here?

    • Ricardo – yes, using a blog page template has one downfall vs. using a category archive page, and that is the inability to (easily) place content above the posts. With the release of Genesis 1.8 we made it even easier to place custom content above the post for term archive pages. However, if you wanted to use a blog page template, you can simply write a custom function to place X content above the posts conditionally on certain pages.

      Sounds complex, but if you get Genesis its relatively easy to do.

  8. Tom Sadler says:

    Brian, this is just what the doctor ordered! I am having one problem. When I get to: “After you’ve done that, scroll down the screen below the post editor and you’ll see a box called “Custom Fields”.” I can’t seem to find the Custom Fields box on the Edit Page screen. I am hardly an advanced user so this could be operator error. Any help is appreciated. Happy to take this to the Studio Press support pages if that is a better place for questions like this.
    thanks!
    -tom

    • Hey Tom – in the upper right hand corner of the edit post/page screen you’ll see a “screen options” link, which will pull down a menu. Make sure that the custom fields option is selected.

  9. Tom Sadler says:

    Thanks! Found it. I knew is was operator error… ‘preciate the help!

  10. Jonah Keegan says:

    Brian, gone through the instructions twice and I think I have it right, but my page is blank. The page name is /blog and the category targeting the page is also called ‘blog’

    Also, the breadcrumb for /blog says “Archives for Blog”

    Not sure if either issue is related, here’s the blog and a test post link:
    http://www.paxind.com/pax/blog/
    http://www.paxind.com/pax/another-blog-test/

    • It doesn’t seem like you’ve got the proper category ID, which is why you’re seeing that message. Can you confirm you have it correct?

      • Jonah Keegan says:

        Thanks Brian! Cat ID was correct, it was a conflict with the Yoast WordPress SEO plugin.

        FYI, in Yoast WordPress SEO > Permalinks, do NOT tick the “Strip the category base (usually /category/) from the category URL” option, it will prevent your posts from showing up on the page.

  11. Justin Schaeffer says:

    Hey Brian,

    You answered Ricardo’s question a few comments up and said: “With the release of Genesis 1.8 we made it even easier to place custom content above the post for term archive pages. However, if you wanted to use a blog page template, you can simply write a custom function to place X content above the posts conditionally on certain pages.”

    I too would like to use the blog page template and have a custom welcome message for each category but I am new to the web developing scene and do not understand your solution. Is there a link that you could provide for further explanation?

  12. Liz says:

    Genesis is my all time number 1 favourite framework, but I never understood the purpose of that little blog section in the Genesis settings page, and now I still don’t (apart from the shorter URL).

    I have been using category pages and like the easy ability Genesis provides for adding to the top. Also, if you are able to choose categories that are terms you want to rank for, you can benefit from some internal linking. Wouldn’t this be wasted if you had to de-index the category page so as not to get duplicate content with the blog page?

    • Some people just want their site to be comprised of pages and posts, and not category archives, etc.

      As for de-indexing them, yes it would be – you’d want to have one form or the other be indexed.

  13. Dave Doolin says:

    This solves a problem for me as well.

    My previous solution (which is still in the procrastination queue) is gin up a template and roll a query on the slug. While that may be a bit “cleaner” (not a fan of IDs) this is definitely a lot faster. I’ll work up the template if I need to get real cuddly with the layout, later.

    Thanks, Brian!

  14. Is there a way to exclude a chosen category that displays on it’s on page for example “podcast” id=5 shows only on the podcast page and in the general “Blog” page it shows everything except id=5 category posts… Is there a special arg I can put in the general Blog page to tell it to exclude categories with id=5?

    When I exclude via the main genesis wordpress setting it strips it from everywhere.

  15. Louis says:

    Hey Brian,

    This is not the right place for this question but I didnt know where else to put it.

    Just wondering how you mad this grid?

    http://www.briangardner.com/themes/

    I have tried the genisis plugins to no avail.

    Kind Regards

    Louis

  16. Louis says:

    Ok got it.

    Column Classes

  17. Craig says:

    Hello,

    I am trying to follow your directions but when I go to make a new page… there is no ‘Custom Field’ box underneath the post editor. Did WordPress change the name or something with the latest update?

    Thanks!

  18. Craig says:

    Nevermind, I saw an earlier post with the answer. Apologize for the repeat question. Thanks!

  19. Alright, here’s another question for ya… What if I wanted to create a page that pulled the most popular posts from the site, using the same method described in this post. Is that possible?

Speak Your Mind

*