More template files Home internal and static pages

As I mentioned earlier, the advantage of having your WordPress theme's parts separated into individual template pages is that your theme will be more flexible and able to accommodate a wider range of content. As nice as my theme currently looks, there are some problems with it that can only be dealt with if I break down the theme's design into further WordPress template pages.

To start, I only want that huge 300 pixel-high header graphic to load on the home page. It's neat to give the feel of a magazine cover, but once the reader has moved to a full article (a.k.a. post) or one of my static pages, I'd rather not have it there eating up screen real estate that the reader could be using to read more content without having to scroll. Likewise, the This Month header only needs to be on the home page, not on any internal page.

Also, while I do want the Features, Columns, Past Issues sidebar navigation to show up in a full article view page, I don't want that navigation sidebar on the About and Contact static pages. I'll have them click on an additional link in the top nav called The Zine to get back to the home page view.

Again, because WordPress is so flexible, it's super easy to add this extra link to the top nav by just adding the list item under the template tag like so:

<li><a href="/">The Zine</a></li>

The Zine link will now let people go back to the home post page if they view one of my static pages. As my CSS style is targeting list items in the top_navigation div, the new list items automatically pick up the same styling as the WordPress-generated items.

Next, the loop needs slightly different formatting between my posts and static pages. Posts are being treated like articles, so I have template tags that announce "by Author Name for Category Name". However, on the static pages, to have "About" as the page title and then "by Author Name" is a little ridiculous.

Last, I'll need the full article pages to display comments under the article with the Add Comment's form underneath that, so if people click on the Add Your Thoughts link, they'll be anchor-tagged down to the form for the post.

Blogging For Cash

Blogging For Cash

Simple secrets to turn your computer into a cash machine. Successful Bloggers know that with the right money making opportunities blogs can become cash generating machines. If you want to start a profitable blog, or profit from an existing blog, you need to know this information. Start blogging for cash today and learn everything you need to know to profit from your blog.

Get My Free Ebook

Post a comment