No sidebar, how to adjust width?

  • Author
    Posts
  • #843573

    thedumberman
    Member

    Hi

    I am building a theme and I want to have the option to turn the sidebar on and off depending on which pages are shown, I want this to be simple so rather than coding it into the theme I am using custom fields. It all works fine but I am stuck with another problem as a result of this. my content section is 650px and the rest is sidebar, but with the sidebar off i am still stuck with 650px of content and i want it to stretch to the whole page. anyone got any ideas?

    Cheers in advance

    PS: website is currently on lockdown so can’t show an example so hopefully I explained it clearly enough

    #843739

    thedumberman
    Member

    Nevermind, got it sorted, for anyone wondering what I did. I created new styles in the css file for the content and post sections, made them content2 and post2 and made the widths longer, then used php if statements to check if the custom field was present and if so use those divs instead of the normal ones, else use the normal works. worked perfectly

    #843799

    michiecat
    Staff

    Hi thedumberman,

    I’m glad you were able to find a solution. However, this support forum is for the free blogs hosted at WordPress.com. We don’t allow users to build custom themes here, instead, users are free to use any of the themes in our Theme Showcase.

    In the future, please post any questions related to building custom themes on the WordPress.org support forums. For an explanation of the differences between WordPress.com and WordPress.org, please see http://en.support.wordpress.com/com-vs-org/.

    #843805

    thedumberman
    Member

    Oh, sorry about that, never realized at all, feel free to delete it if its not for here

    #843819

    michiecat
    Staff

    No worries, I just wanted to let you know.

The topic ‘No sidebar, how to adjust width?’ is closed to new replies.