This is a follow up to my post about the Genesis blog template, because that template was a serious part of the solution for me. What happened here was that Rabia Gale, who also happens to be my sister-in-law, decided to serialize Quartz, one of her novels, on her website. Super fun project! She asked how she could do that without it getting swirled into the mix of her regular blog and wondered if she needed to set up a second site to handle it, so that she could have separate sidebars and information. Somehow it seemed like extra work to me to have an identical site with different content–she’d have to log into two different places, keep both installations updated, and it would be a hassle. I think. So I puzzled a bit and decided that surely we could set up a custom post type in WordPress for her, which would give her the separation, an option for custom sidebars, and a separate RSS feed.
Happily, Google led me first to Carrie Dils’ easy tutorial on how to set up sidebars for a custom post type. That was my first step and probably the easiest to get sorted. I knew I wanted the custom sidebars on both the individual episodes and on the novel’s archive page as well.
My next puzzle to solve, and the hardest, was to figure out how to handle the archive page. What I really wanted was a page that would not only show the episodes, but would also have at the top, a synopsis and/or instructions for how the serialization would work. I saw a recommendation for a plugin that would generate an archive page for me, but it absolutely did not work with my custom sidebars, no matter what I did. So I struggled with making a new archive page, messing with the loop, and honestly not succeeding.
Until inspiration struck, and I remembered the handy Genesis blog template and my preferred trick to have the content and the posts. It’s possible to use the blog template to pull not only a specific category, but to change it to pull a custom post type instead. In this case, my query_args custom field became “post_type=quartz” (the name of the post type). At this point, I was mostly done, since now I could set up a page to pull the custom post type as a blog feed, Rabia could put her synopsis at the top, and fill her Quartz-specific sidebars with whatever widgets she wanted–like a table of contents.
The final trick was to hide the post info and meta fields on my new archive page, which I could not do with PHP since I was using the standard blog template (if I did modify that template, it would mean that Rabia couldn’t use it for other things, which would be unfortunate). This was easily done by adding a custom body class to the page and using some CSS to hide it.
I’ll confess, I wasted quite a bit of time sorting through this one, and my online searches for answers didn’t show this as an obvious solution (so either I’m alone in wanting to do this or it was more obvious than I thought). In case I’m not alone, I thought I’d share my experience so someone else can benefit.
I think you might also enjoy reading the novel! Go on, check out Quartz today! (Since today was the first episode, you won’t even be behind.)