• How do I change the width of the sidebar? Is it dependent on your theme or layout? I can find the sidebar and stuff. The theme I’m using is the twenty eleven 1.2. I’m modifying it to learn how to make my own theme (I don’t know if this is a good way to learn it or should I just start from scratch but I was planning on starting from scratch later if I haven’t figured it out, if it’s a bad idea please point me to a place to learn it) I can’t seem to find the sidebar. I think it’s under a ID called secondary or it’s the class sidebar can’t be certain for sure but secondary thing.

    I’m looking at the CSS I changed the ID divs that are content and secondary which is the “main” blog area and the sidebar it seems respectively…and it changed the size of the content and the sidebar area but…then the sidebar gets pushed down and does not begin where it would which is after the menu…but then what is the extra stuff they have that is labeled /*Right content*/ with left-sidebar# secondary.

    It’s so confusing, do you guys think I should just build a theme myself? If so where do you recommend reading about that? I know html and css but am not familiar with PHP or MySql

Viewing 9 replies - 1 through 9 (of 9 total)
  • How do I change the width of the sidebar?

    Normally using CSS.

    Is it dependent on your theme or layout?

    Is that a trick question? ?? Your theme controls your layout via its template files and CSS (stylesheet).

    The theme I’m using is the twenty eleven 1.2. I’m modifying it to learn how to make my own theme

    Whilst Twenty Eleven contains some excellent code examples, I wouldn’t describe it as the best theme for a beginner to play with. It’s too complex in places. Something like Starkers might be a better theme to play with for a learner.

    Thread Starter vieya

    (@vieya)

    Ah I see. It did seem really complicated but it also seems to fit the style I’m looking for the most. (Twenty Eleven, that is)

    Do you think I should start from scratch? I’ve read some tutorials (although I don’t know if those are the most user-friendly) but it seems I can use my knowledge of CSS and HTML and use some simple wordpress php tags to make my own or is it actually much more trickier than I think?

    Do you think I should start from scratch?

    No. I think you’ll find it far easier to tinker with pre-existing themes to begin with. If Twenty eleven suits your needs, then use it. But I would suggest that either you copy the theme and rename it to create a new, standalone, theme of your own to play with. Or create a child theme for all of your changes. Twenty Eleven is the default WordPress 3.2 theme and having access to an unedited version of the theme is vital when dealing with a range of site issues.

    If the thought of creating a child theme is a little too much, you can download a pre-made, starter, 2011 child theme.

    Thread Starter vieya

    (@vieya)

    Oh thanks I created my own child theme ?? I can understand why if you want to modify you should just use the child theme. I wish they made it so that you could have your own modified function overwrite the parent theme though so that you can edit whats already there instead of just adding to it. Sigh.

    Where do you think I should go to learn about making my own theme from scratch? I have another website layout that I want to turn into a theme.

    I wish they made it so that you could have your own modified function overwrite the parent theme though so that you can edit whats already there instead of just adding to it.

    That should be possible with Twenty Eleven. Which function are you having problems with?

    I have another website layout that I want to turn into a theme.

    What sort of layout is it? 2 column? 3 column? I usually suggest that you start by picking up a free theme that has a layout that’s similar to what you want and then turning into a custom theme by adapting it bit-by-bit.

    Thread Starter vieya

    (@vieya)

    I read the child theme thing and it said it adds to the function but doesn’t overwrite. I’m not having problems well not so far but I was just stating that because in the case of the other stuff you basically overwrite the functionality or so the child theme page said.

    As for the layout it might not be as common which is a scrolling div. I don’t know if that’s even possible and I wanted to make a horizontal scrolling one.

    it said it adds to the function but doesn’t overwrite

    I think you’ve misunderstood how child themes work. Because the child’s functions.php file is loaded first, it’s functions take precedence over any functions with the same name in the parent. Child-friendly themes precede each function with if ( ! function_exists( 'function_name' ) ). Translated, this means, if this function hasn’t been loaded already (in a child theme), use this one.

    So you can “over-write” the parent’s function in a child theme. Some of the better themes also have filters that you can add to so that you can tweak the parent’s output via the child.

    Does that help?

    As for the layout it might not be as common which is a scrolling div.

    Start by picking a theme that has the right number of columns & width. Then look at ways of adding a scroller by means of code or a plugin.

    Thread Starter vieya

    (@vieya)

    So what if I have a blank functions.php in the child theme? Does that mess up the functions all together? How exactly would I overwrite the parent’s function?

    Also is it a problem when I have a functions.php file that has no actual coding in it for the child theme? Or is that not a good idea? In the beginning it seemed to work out fine because the child functions.php was just a copy of the parent theme functions.php so I removed the coding and it worked(since before with the same coding on both the child and the parent caused conflicts) Today when I revisited the site and tried to log in I couldn’t(don’t know if this is due to the code of the child theme functions.php being removed.

    Right number of columns and width? Do you mean as in right for me or is there a standard? Also is the PHP in the wordpress different from the PHP normally used? Where would you recommend to learn about how to use PHP and MySql?

    Thanks by the way you are very nice and helpful!

    Does that mess up the functions all together?

    No.

    How exactly would I overwrite the parent’s function?

    By recreating the same function in the child theme but with your custom code.

    Or is that not a good idea?

    A blank functions.php file has absolutely no effect.

    Do you mean as in right for me or is there a standard?

    Right for you.

    Also is the PHP in the wordpress different from the PHP normally used?

    No – it’s just standard PHP with the addition of WordPress-specific functions.

    Where would you recommend to learn about how to use PHP and MySql?

    https://www.php.net/
    https://www.codewalkers.com/

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to I change the width of the sidebar?’ is closed to new replies.