One of the neato things that I really like about the Genesis Framework from StudioPress (affiliate link) is that it comes with a couple different templates that I (or you) might find useful. The default template is what I use most often, but my second favorite template is the Blog Template. The obvious and easiest thing to do with it is to create a blog or news page, at which point it displays your most recent posts (which gets a little confusing, because it’s a page that just shows posts). You know, like a blog. For quite a few of us, that’s all we need, and once you set up the page, you never come back to it.
However, it’s possible to finesse the use of this a little bit by making a blog page for a specific category (or categories). Sometimes I just use this so I can show posts from a category without the link showing category/name-of-category/ (because who needs that?). I can also use it to set up a page that pulls posts from more than one category, which can come in handy.
Now, my issue is this: if I use the blog template on a page, it works excellently well for displaying the posts, but if I want to add introductory content to explain the category, it won’t show. If I skip the blog page and just use the category link that I don’t like, I can go into my categories and give them descriptions and SEO friendly titles (but what if I want a picture? or a form? and my clients may not remember to change the category info either), and I should do that anyway, but usually I would rather have that page, and get the best of both worlds: my content AND my posts.
Happily, Genesis allows me to do that, if I copy the page_blog.php file from the core Genesis folder, add it to my own theme folder, and add this line:
You May Also Like:
add_action( 'genesis_loop', 'genesis_standard_loop', 5 );
It has to be before the line that says
genesis();, but that’s it. Now, whatever I put into the page content shows above the most recent posts.
One example of where I want this: the SM2 student ministry has a big annual event called FISH. On their site, they have a page describing what it is, and then when it’s coming up or actually happening, there are news posts (registration, info, pictures). Without this trick above, the page and the posts are totally disconnected, and the page has to have a link to each of the posts (“click here to register!” “click here for the schedule!”), which gets old. With this trick, I have one page that has all of the FISH event information in one place, with a super easy link.
I just finished a project with custom post types, and this trick solved a myriad of problems for me there, too. Since it’s one I use all the time, I thought I’d share–I know others need it, too. I am planning to share some of the lessons I learned in the process–namely, don’t make your job harder than it really is.
Since I do use this all the time, and I know I’m not the only one, I’ve actually asked StudioPress to make it standard. Hope they do, but if they don’t, it’s an easy fix.