Support » Themes and Templates » Where is this in default theme?

  • Using the default theme, on the main page, when you click on the title of a post you are taken to a page with just that post, with no sidebar. I like this clean look. However, the theme I am working with takes you to that page, but includes the sidebar. I want this theme to display a clean simple page like the default does.

    Where do I look to edit out the display of the sidebar for the individual post page? I just can’t see what is calling the sidebar to display on that page.


Viewing 15 replies - 1 through 15 (of 18 total)
  • Find the single.php file, then edit it as you like. If your theme doesn’t include the single.php file, copy the one from the default to your theme folder.

    For more info on the hows and whys: Template_Hierarchy

    OK – Thanks for the quick reply. These forums are a life saver, not just when posting, but when searching. It is amazing how many people have already had the same problem you are running into.

    I have a single.php file and I did look at it so I am glad I was on the right track. I could not find anything that looked right to remove to not call the sidebar. However, I am a novice am probably missed it.

    I’ll take another look and if I still can’t see it, maybe I can paste the code here and you will see it right away!


    and thanks for that codx link. I use the codex all the time and find it written well enough even for a novice like me to understand. I had not come across that page though. Very helpful.

    OK, guess I am getting tired, another look and I found it. Thanks

    The last thing I would like to do tonight now that the side bar is gone on the single post page is adjust the width of the content just for that page. Of course I can’t find where to do that. Any ideas on that?

    Ouch. You’re asking someone who holds NO BRIEF for the “default” theme at all. I knew what to tell you on the sidebar since that’s a common problem….

    The “default” theme is a RIGHT BITCH to change though. It’s entirely laid out with graphics instead of being done right with css…. I honestly don’t know what to suggest as far as that, and truthfully I don’t want to know.

    The “default” theme is balls-up as far as decent code – I won’t mess with it at all. I don’t know anyone who WILL mess with it. See this thread:

    And if you do a search for “default theme” (without the double quotes) you’ll probably find more than several hundred topics just about like that one.


    Actually I am not revising the default theme. I just liked the way the single post looked in the default theme and wanted the theme I am working with to have the same sort of clean looking single post page.

    The theme I am working with is called “I Feel Dirty”.

    I thought maybe you would know what file to look at to adjust the width of the content just for the single post page. I guess you are saying that is different in every theme?

    Ah…. sorry…. I got confused (not at ALL unusual!) I’ve not used that theme (I Feel Dirty) so don’t have any empirics in reference to it specifically.

    But yes, that sort of thing changes theme to theme pretty much. You’ll want to open the single.php file, look at the ids and classes for the divs in the layout, and then look in the style.css file for those ids and classes. Somewhere in there you should find some width declarations; changing widths is perhaps where you want to start.

    Without knowing the theme though, what I said there is just so much smoke n’ mirrors – I’d have to download it and look at it myself to give any more concrete information – could you give a link?

    [Edit: late here, I’m headed for bed – if you want to just send a link to download the theme to vkaryl *at* bytehaven *dot* com, I’ll look at it in the morning….]

    Thank you VERY much for your help. I could not find any reference to width in the single.php file. In the style.css, it seems only to control the “main” body width, but as I said, I am a novice, and a tired one at that!

    But here is the link to the theme. Really appreciate you looking at it!


    I’d take a closer look at the “content” div…

    Thanks Rudolf. I am enough of a rookie with this that I am not sure I understand your suggestion. This:

    <div class=”main”>
    <div class=”content”>

    is in the page.php file and this:

    .content {
    padding: 20px 0 0 15px;
    float: left;
    width: 564px;
    margin-right: 17px

    is in the style.css file. The width reference in the style.css changes the content width of the post on the main blog screen, (maybe on all pages). I only want to change the content width on the “single” page screen where I removed the sidebar.

    Sorry if I am confused and not following your suggestion correctly.

    Maybe if vkaryl has time to look at the actual theme files I linked to above, it will be obvious what needs to be done.

    Then I’d re-write the single.php to have something like
    singlecontent (instead of content)
    and define its width as 664px (or whatever suits you) in the stylesheet:

    .singlecontent {
    width: XYZpx;

    Now that’s an idea that conceptually even I can see working. Question is if I can pull it off???

    So all I would have to do is in the page.php file, change “<div class=”content”>” to “<div class=”singlecontent”>”?

    Then where in the style.css file would I put what is needed? Would I just add something like:

    .singlecontent {
    padding: 20px 0 0 15px;
    float: left;
    width: XYZpx;
    margin-right: 17px;

    in the “main” section? Or would I need a new section? Right now my style.css file has header, main, sidebar, comments and footer sections.

    1. It should be in the single.php file – if you want the single post view to be without sidebar. (page.php controls the display of your Pages)

    You can add it anywhere in the stylesheet. I add my modifications at the end, so I know where they are…

    OK, I got this to work and learned a bit more in the process. Thank you!

    I really do have to get better at this, though. I feel like my questions are sometimes so elementary, it is embarrassing. Also it is frustrating that even when things work and look right, if I run my changes through a validation web site, there are errors that I don’t really understand how to fix. Because the page works, I leave it, but feel uneasy doing so thinking the errors may cause trouble with something else in the future. Oh well. Guess the thing to do is to keep studying and asking questions.

    Thanks again for the time you put in helping!

    I’m glad you got it worked out…. I apologize for not being able to get back to this, I had dish and then power problems (damn guys with backhoes….) – just got back here finally!


    No problem – You DID help me work it out by telling me what I needed to do and then letting me stumble through it and learn a bit.

    I’m sure I’ll be posting questions again once I progress enough to try and work out the validation errors. The problem with the validators I have tried is that they assume that you wrote the code yourself so you will understand the explanations of the errors. They are not expecting novices to hack up perfectly good files to try and get something a bit different.

    Thank goodness for the volunteers in these forums!

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘Where is this in default theme?’ is closed to new replies.