Container class only in posts page


Because I want some divs to stretch out 100% in width I have removed the container class(div class=“wrap container” role=“document”) from base.php.

Now I do want to have a container class in the posts page and I tried to add one with a div in index.php. But the result of this was not what I had expected, the container class does not behave as it should and does no appear when viewing a posts entry page.

I wonder is there a way to add a container div to posts page, posts entry page without affecting the other static pages?


The markup for displaying post content is (by default) within content-single.php. This is basic WordPress template hierarchy which you should know before using Roots because it’s not intended for beginners.