ThemeShaper Forums » Thematic


Clarification on Static Pages and how to use Template with them.

(9 posts)
  • Started 11 years ago by shelzmike
  • Latest reply from Hellah
  • This topic is resolved
  1. shelzmike

    I hope that this has not been covered, but I had a quick question regarding using static pages and child themes. This is not so much a question actually as it is a confirmation of what I am doing is correct.

    So, I have a site that I am building that I am using more as a business site, but still want to retain the blogging functionality when needed.

    That being said, I want to have a static home page that has a bit more HTML (divs and such) on it than the rest of the pages. So here is what I am planning on doing:

    Set the option in WordPress admin to have a static home page. Now for the WHOLE site I will want to have a standard header and footer (I know how to do this and have already completed most of it). And on the main overall template design I want to have basically a header, footer, sidebar, and an area to the right that simply has the post content for a single post. However, on my home (static) page I want to have completely different html plus no sidebar.

    So my question is - how should I accomplish this - by a method similar to this post?

    Basically, where do I need to add my html in order to have it appear only on the front page. I am guessing I can use is_front_page() but where do I add that action to and what should I remove. (Essentially, all of this content will be within the main div (or at least occupy the same area using nested divs.)

    Whew..sorry for the long narrative, but I have taken in a lot about WordPress, Thematic, childthemes, and php all in the past week or so and I just want to make sure I am on the right track. Thanks in advance for any help!


    Posted 11 years ago #
  2. @ shelzmike,

    I know it's been a couple days, but you should look at some of this stuff.

    You can set a static page for your main page and then either create your own page template, or use one of the techniques above to either remove the sidebar, or to use a completely different stylesheet for your main page.

    I gotta tell ya, I am using the different stylesheet for my main page, and it's really working beautifully for my needs.

    Let us know how you get on:)

    Posted 11 years ago #
  3. amygail

    Hey Guys

    this is one way to do it

    But one of the beauties of Thematic is the dynamic body classes that it generates for you

    for instance - I use:

    body.slug-home #main {
    padding-top: 14px;
    background: transparent url(./images/homeconttop.png) no-repeat right top;


    to style the #main div only on the 'home' page

    i'd use

    body.slug-about #main {
    padding-top: 14px;
    background: transparent url(./images/homeconttop.png) no-repeat right top;

    for the 'about' page

    you can also style custom templates etc... #main {
    padding-top: 70px;
    background: transparent url(./images/discography-wide.png) no-repeat right top;


    no need to deal with any php

    Posted 11 years ago #
  4. You're a gem amygail;)

    Posted 11 years ago #
  5. shelzmike

    Actually, it has worked out pretty well. I actually figured out to use a template page for my home page - it is much easier this was since my home page was completely different than the rest. I am actually close to completion and am quite humbled by my results. Bear in mind this is only my second attempt at Wordpress, Thematic, Child Themes, etc. I think I came along pretty well (though, again..not finished yet). Client should be happy..

    Thanks for the help though!


    Posted 11 years ago #
  6. amygail

    Looking good Mike!

    (thanks awarner20)

    Posted 11 years ago #
  7. Hellah


    I'm looking for a solution for having a transparent background of the #container only on one page. It looks like the body class is something i should be using. Could you clarify a bit, where the above mentioned code should be placed...? Thanks a lot!

    Posted 11 years ago #
  8. Hellah-

    All your styles should be declared in your childtheme's style.css


    Posted 11 years ago #
  9. Hellah


    Thanks for your replies. I have one more question about the use of the body classes.

    I have created a page called "News", where all the posts are shown (and all the rest works with pages).
    On the News page (and also when showing only single posts), I would like to have the main column width different from other pages.

    If I try to modify the width on any other page, it works - like this: body.slug-about #container {width: 440px;}
    But changing the slug into "news" wont work on my news page that contains posts.

    Is there a different "body slug" version that could be used for posts?


    Posted 11 years ago #

RSS feed for this topic

Topic Closed

This topic has been closed to new replies.