How to Create a Blog Page with a Single Category

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?

Email Newsletter

Like what you read here in this blog post?
Get more like it delivered to your inbox daily.

Comments

    • says

      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.

      • Sveva says

        Sounds simple enough, but I don’t see the custom fields under the editor. All I see is “Theme SEO settings” and “Layout settings”

        What am I missing?

  1. 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.

  2. 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 :-)

  3. 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?

      • says

        I’m not sure I follow why one would be shorter than the other. I’m not that accustomed to WordPress quirks yet. SEO-wise (search engine optimization), I’ve read that Google limits the levels of a hierarchy to index, which means a relatively “flat” hierarchy can be preferable in that context.

      • Larry says

        Thanks Brian. I guess it would be a good idea then to make sure one or the other (the auto-generated wp category or the new “Blog Page”) is “noindex”ed in the seo settings to avoid duplicate content.

        I definitely like the shorter url better myself (I was recently trying to figure out the easiest way to shorten them…)

        • says

          Hey guys! I read through the first 20 comments or so really curious how that was working out but got a little disoriented on the whole thing with the category removal and /categories/ removal as well…

          I Googled removing categories from URL and ended up on a page where they recommended the following plugin:

          WP No Category Base – WPML compatible
          http://wordpress.org/extend/plugins/no-category-base-wpml/

          I tested it and it worked for me. Then I saw the Yoast plugin has a checkmark to remove them also, cool, and now I realize this whole topic was about a single category Blog page, and I ended up off topic… anyway perhaps that plugin will help anyone else who wants an easy way to remove the /categories/ from the URL…

          LOL Thanks! BTW I used your theme as is for now and I feel terrible about how similar it looks so we will get to customizing soon :-)

          - The Real Charles Montgomery

          • says

            Honestly, I’d rather do it manually per the instructions in this post than to have to download yet ANOTHER plugin just to get things to function (more bloat, and I wouldn’t want that).

    • says

      This may not apply directly to the Genesis Blog template, but another scenario runs like so: Client wants an editable paragraph at the head of each Category listing.. a page template with a second loop does this nicely!

        • says

          But if your client does not mind using HTML himself, there are already boxes built in on each category in Genesis where intro text can be added.

          • says

            Just a note to help out others since I spent a while trying to figure out how to use either of the above solutions:

            * Using Yoast’s WordPress SEO, you need to create a category as normal, then go back and edit it! There’s a very powerful pageful of settings there, which I never saw before since I never needed to edit a category.

            * I think Liz is referring to the standard WP category intro text plus a feature in many Genesis child themes that enables that category intro to be displayed. If your theme doesn’t have that option, Yoast has some code to drop into functions.php: http://yoast.com/wordpress-archive-pages/

            These 2 options result in different CSS being applied.

  4. says

    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?

    • says

      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.

  5. 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

    • says

      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.

      • 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.

  6. 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?

  7. 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?

    • says

      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.

  8. 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!

  9. says

    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.

  10. 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!

  11. says

    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?

  12. says

    I think I may have come up with a GREAT reason to do this – wouldn’t this be the best way to craft a dynamic category dropdown menu, say underneath the blog link in the navigation? That could be very good from an SEO Standpoint (barring the duplicate pages with the default category pages in existence being handled like Ricardo mentioned above).

    I would like to know how to add custom content to the top of each of these category pages, I saw a couple other people requested as well….

    Ricardo a Popular Articles Page I would also be interested in here… I think what we are looking at going down this rabbit hole is a way to add a little bit of content to a page full of blog posts, within a category structure as a way to leverage existing content for solid SEO benefit…

    Thanks for all your work Brian, I feel bad even posting I have no idea how you keep with your comments! :-)

  13. says

    Brian, thanks so much for this incredibly useful information! Is there a way to create a sticky post on the single blog category page I just created using this tutorial? If I make a post sticky, even though it is marked with the single category, it goes onto the main blog page as a sticky post, and it is not sticky on the category page.

  14. Ben Hanlon says

    Hey guys,

    I’m getting so frustrated with how dumb I feel for not being able to figure this out. I simply want to have a category “writers” with a bunch of categories within that “writers name”. But i want them all publishing to the blog but seperated by their own category.
    According to the instructions above are we supposed to create all content on pages and use the query_args code to point to what category we want?
    I tried this and it isn’t working. Please set me straight. Thanks in advance.

    http://bigleagueblog.com

    -Ben

  15. says

    Ok, i figured this out, what I’m wondering is can we do this with author archives as well, or just categories. For example would the query_args work with user_id=?

    Would this work with Tags as well?

    -Ben

    • says

      Hey Ben – sorry about your previous comment, it was marked as spam and I just saw it now. As for the “user” question, try using something like author=1 as the custom field option.

  16. says

    Brian, I’m using Genesis and Premise and I’m trying to make a Page with query_args only available to subscribers.

    When I assign the page Membership Access to only subscribers, the Posts are still listed for everyone to see with Title, Date, and Featured Image showing for each post (Premise hides just the excerpt, instead there’s a link to log in).

    I really need the whole page hidden — or at least the posts. Is there a way I can put query_args in the body of the page? Then I can bracket it with [show_to] so only subscribers see.

    Thanks,
    David

    • says

      Hey David – hm, honestly not sure the best way about going with that. It might be something you want to shoot through the Premise help desk, as I know Daisy might be better suited to answer the question for you.

  17. says

    Hi Brian,
    Nice tutorial but I have a question related to the structure of a blog. I have 4 main topics. Should I create 4 categories or a single category (ex. blog) and follow the steps you recommend on this article?
    Is “Tutorials page” a main category or has a parent category?
    Thanks for your help.

    • says

      It really depends on how you want to set things up. You can use categories and/or tags to separate topics. If they truly are 4 different topics (such as Fashion, Sports, Politics and Travel) then I’d suggest using categories to separate them.

      On my site, the “Tutorials” page is actually a category on my blog, which I’ve pulled into a “Blog Page” like I’ve explained here in the post.

      • says

        Sorry but there is something that I can’t understand. In this article you teach “How to create a blog page with a single category”. What is the difference between this article and create a menu item pointing to a specific category?

      • says

        I was following your directions to build a category blog page using your steps. At first it didn’t seem to work, but it looks like it’s working now! Sweet. The Genesis and Studio Press stuff is outstanding. And your advice and tutorials are great resources.

  18. says

    Great tip, Brian. It solved a problem moving a client from a custom theme where her blog was at /blog, to a Genesis theme that used the home page as the front page. Now we don’t have to change the path to the blog.

    From the time I moved the client’s blog from Blogger into her WordPress site, I used ‘blog’ as the default post category and had the client apply additional categories as needed. This way everything went on the blog, and we could also pull out special categories like ‘press’ when they’d received some press coverage.

    Thoughtful categorization, in combination with your query_args tip, makes it easy to have blog pages without the undesirable /category/ in the URL, and have a great, automagically-updated home/front page as well. Thanks!

  19. says

    Thanks for the input Brian. Im really new to this and as I was following your tutorial my blog template page still shows other posts that are under other categories. However, I was trying to edit the settings on Blog Settings as you showed and I can’t seem to locate those Blog Settings options. I do have a WordPress template; do you think there might be another way to fix this issue? Thanks you in advance.

  20. says

    When you first posted this I couldn’t think of a reason to use it, but that changed just now!
    We needed to put job openings on a single landing page, but don’t want them to show up on the main blog page. So I…..
    -set up a “job opening” (id=26) category
    -added the query_arg cat=-26 to EXCLUDE all job posts on the /blog/ page
    -added query_arg cat=26 to only show jobs on the /jobs/ page
    -use simple sidebars to show job application info only on the /jobs/ pages
    How easy!
    *mind blown*

  21. Affan Ruslan says

    Hi Brian, this is pretty cool.
    Can you show me how to create a blog page with a single post format? For example, audio post format.

  22. Steve says

    Hi, this is exactly what I want. It’s so simple it should be part of WordPress. However, I can’t get this to work. It continues to return all my posts. I’ve checked and checked again the category ID’s, but it still won’t work. I’m using Canvas 5 Theme…so I’m thinking it might have something to do with that. Any suggestions would be appreciated. Thanks,.

  23. says

    Brian, Is there a way to exclude the “standard” format from the home page? That would allow me to have the tumblr style, without the longer blog posts on the main page. I want to be able to use categories under my blog page, which will be different than the home page.

  24. says

    Hey Brian!

    I SO want this to work…

    Here’s what I’m trying to do (and what I have already done)

    1. create custom post type (‘set_list’). Put ‘em in categories. done.
    2. create page template (why? because specific sidebar, different from all other pages) and have posts of that type go on pages with that template – check.
    3. exclude specific categories from some of these pages. – This is the part I can’t make work.

    I couldn’t get your solution above to work. I put query_args and cat=-39 (and the others), but nothing happened. I’ve tried everything I could think of in php as well; nothing I do has any effect on the output of posts on my page template. Ultimately I ended up with a bunch of display:none (go ahead and have a giggle at that).

    Why wouldn’t this work with the custom page template? Or maybe the better question is, why would I simply assume this *would* work with the custom page template? ;)

    Help?

  25. Deborah says

    Hi there

    I had this working fantastically for a couple of months but now it has stopped – Genesis Framework and Focus theme. Is it possible an update somewhere has changed something, or do I need to update something somewhere?

    Thanks

  26. Jantje says

    Hey,

    I do not have the custom fields section in the ‘add a page section’ (I use the Copyblogger Child Theme downloaded last week), so I looked at the snippets provided under http://my.studiopress.com/snippets/custom-body-class/ and apparently it must be something completely different (I am new to blogging), as my webpage now shows a “fatal error” and WP does not let me delete the entered snippets.
    I added a snippet successfully before, so, I really do not know what is happening.

    Just wanted to post this, if someone else finds himself in the same situation and does not make the same mistake I did.

  27. Anton says

    Hey Brian,

    This is great information, thanks for posting it for us all. My question is how can I get the category page to just show summaries? For instance title, date and the first 20 words?

    I would like to use this as a press release section on my site.

    Thanks!

  28. says

    Would love to do this, but I’m using Prose, and for some reason there are no “custom field” options on the WP Page set-up.

    Is there another way to create this?

  29. says

    Man, thanks for this, I love simple solutions. Most developers would probably jump to create new templates and such. This is so easy to implement I feel a little guilty. ;-)

  30. says

    Awesome resource, and perfect explanation.

    I have to say, normally I don’t post praise, but the Studiopress Themes are just really nice and very tight when it comes to performance and flexibility.

    I’d recommend Studiopress themes to anyone

  31. says

    Is there a way to add some static text above the beginning of the category post? I’d like to have some introductory text about the category that doesn’t change, followed by the posts from that category.

  32. says

    I think I found the answer to my question from Jennifer Baumann, aka Genesis Rockstar.

    She has a simple article explaining how to do exactly what I was looking for, allow the editor box above blog pages so I could add some static text to my blog pages. Between this article and hers I have my perfect solution. Thanks guys

    http://dreamwhisperdesigns.com/genesis-tutorials/add-content-genesis-blog-page-template/

    By default, the Genesis Framework Blog Page Template does not allow you to display content added using the WordPress editor. In some cases you may want to add an image or additional information at the top of the page. To enable this functionality, simply create a file named page_blog.php in your child theme directory, with the following content.
    <?php
    /**
    *
    * Template Name: Blog
    * This file handles blog post listings within a page.
    *
    * @author Jen Baumann
    * @link http://dreamwhisperdesigns.com/?p=1011
    * @package Genesis
    */

    add_action('genesis_loop', 'genesis_standard_loop', 8);

    genesis();

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>