CSS to remove sidebar on page

  • Unknown's avatar

    Hi,

    I’m looking for the CSS code to remove the left and right sidebars on my posts and pages but I want to keep bots sidebars on the home blog welcome page https://montrealmodedesign.com/.

    May you help me please.

    Thank you

    Marco

    The blog I need help with is: (visible only to logged in users)

  • Unknown's avatar

    Hello

    To remove the sidebars from your post pages please go to My Sites → Design → Customize → CSS and add the below code there:

    .single-post.has-double-sidebar .left-sidebar,
    .single-post.has-double-sidebar .right-sidebar{
    display:none !important;
    }

    Note: The custom CSS feature is only available if you are under premium plan.

    For more info please refer the below support doc here:
    https://wordpress.com/pricing/
    https://en.support.wordpress.com/custom-design/custom-css/

    Regards:

  • Unknown's avatar

    Hi,

    Thanks for your answer. I would also like to try to try to keep the default theme setting for page and post. I changed the sidebar width for the home page but I would like to keep the original for the page and post. Is this possible ?

    This is the CSS I use now :


    @media
    screen and (min-width: 1272px) {
    .has-double-sidebar .left-sidebar,
    .has-double-sidebar .right-sidebar {
    width: 40%;
    }

    .has-double-sidebar .content-area {
    width: 20%;
    }

    .has-double-sidebar .left-sidebar {
    padding-right: 20px;
    }

    .has-double-sidebar .right-sidebar {
    padding-left: 20px;
    }
    }

    Thank you for your help!

  • The topic ‘CSS to remove sidebar on page’ is closed to new replies.