• Resolved mayurjango

    (@mayurjango)


    I want to display 2 sidebars (300px+220px) along with content (720px default) on the homepage, thus total width being 1240px wide. But on single post pages, I want to display only the primary sidebar (300px wide) and want the width of content area to be 720px.

    But as there is no way to define a specific width for single page, the content area on single pages scales up to 940px in width (when showing one sidebar). I want it to be 720px or lesser for single pages, is that possible?

    Please help!!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hi mayurjango. One way to approach this, without changing the theme layout, is to create a sidebar “placeholder” to keep the page content within the 720px area.

    1. In Theme Options – Sidebars create a new sidebar named “Empty Sidebar” (or whatever you want to name it).
    2. Don’t add any widgets to it.
    3. In each page that you want to display just the primary sidebar, set the page layout to show both sidebars (or, if that’s the default layout, just use that), and select the “Empty Sidebar” as the secondary sidebar.

    Try that and let me know how it works.

    Thread Starter mayurjango

    (@mayurjango)

    Hi bdbrown, Thanks for the smart suggestion.

    I did exactly as you said but it’s not appearing like the way I want. Even though secondary sidebar has no content, it shows up and takes its space. I want the content area with primary sidebar to be center aligned.

    Current situation screenshot: https://i.imgur.com/6aNAOa3.jpg

    Look forward to a preferable solution.

    Try this css and see if it gives the desired result:

    .single-post #wrapper {
      max-width: 1020px;
      margin: 0 auto;
      }
    Thread Starter mayurjango

    (@mayurjango)

    Hi bdbrown, that worked up to a certain extent. But the header and footer area aren’t expanding to their full width, just have a 20px padding on both sides.

    I want them to extend fully. Also, is it possible to apply this change on all site pages expect the homepage?

    Screenshot: https://i.imgur.com/YALsLlV.jpg

    Thanks again, You rock man!!

    [ No bumping please. ]

    See how this works:

    body:not(.home) #wrapper .container-inner {
      max-width: 1020px;
      margin: 0 auto;
      }
    Thread Starter mayurjango

    (@mayurjango)

    This worked like a charm! You’re awesome bdbrown.

    Thanks a lot. ??

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Change the width of content area on single post pages’ is closed to new replies.