• Hello,

    I would like the posts to be in full width on the Olsen Light theme. I know that there isn’t any easy option, but I’m trying to change the CSS to achieve it.

    I’ve removed the sidebar
    <?php get_sidebar(); ?>
    from single.php

    But I can’t seem to find where I can modify the width in style.css.

    I’ve tried with several solutions I found on Google (even though I know that I doesn’t fit the theme, I tried it anyway)

    I tried with:

    .single .site-content {
    	margin: 0;
    }

    and:

    .single-post #secondary {
         display: none;
    }
    
    .single-post #primary {
         width: 100% !important;
    }

    But none of them works.

    Does anyone have an idea how to get the post in full width?

Viewing 10 replies - 1 through 10 (of 10 total)
  • Hey there,

    You can achieve what you are after by adding following custom CSS to your theme using Advanced CSS Editor.

    .sidebar.sidebar-right {
        display: none;
    }
    
    .col-md-4 {
        display: none;
    }
    
    .row {
        margin-left: 0px;
        margin-right: 0px;
    }
    .col-md-8 {
        width: 100%;
    }

    Hope it helps.

    Thread Starter andersb

    (@andersb)

    Hey Suyogya Shukla,

    Thank you for your help ??

    It worked a little too well. I’m trying only to make the post full width, but this way the pages is full witdh as well. Do you know how to do that? ??

    Hey there,

    Can you please post a link to your site? As this would require me to know the page ID at which your posts are displayed. And do you only want to make a particular post full width rather than all posts? Hope you understand.

    Thread Starter andersb

    (@andersb)

    Yeah, of course. This is my site

    I would like all the posts to be full width, but still keep the sidebar on the main page.

    I’m really thankful for your help ??

    Hey there,

    Your blog page and main page are same, right?

    Thread Starter andersb

    (@andersb)

    Yes, it is ??

    Hey,

    It’s not possible to make posts full width while keeping the sidebar on main page, if I understood you correctly ?? Hope you understand.

    Hello @andersb

    Since you have already removed the sidebar from the single.php, locate this line
    <div class="col-md-8"> and change it to <div class="col-md-12"> that should do the trick.

    PS. make sure you have removed the entire sidebar’s container from the single.php

    <div class="col-md-4">
    		<?php get_sidebar(); ?>
    	</div>
    Thread Starter andersb

    (@andersb)

    Hey @nvourva

    Thank you so much. It removed the sidebar and made the post in full width. ??

    Now my only problem is that the size of the pictures doesn’t change even though the post is full with. The images has a bigger resolution than what is shown in the post, so it seems like there is some kind of limitation somewhere. Do you know where I can change the size limitation on the images?

    Thanks for the help @nvourva and @suyogya Shukla. It’s so nice of you!

    What you can do is change ‘post-thumbnail’ to ‘full’ in this line
    <?php the_post_thumbnail( 'post-thumbnail', array( 'itemprop' => 'image' ) ); ?>
    in the single.php file.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Full width posts’ is closed to new replies.