How do I make Div Container 100% width only on homepage of site?

This is more a CSS than a WordPress question, but

There are several ways to do this, but I think this is the easiest. WordPress themes should use the home class on the body tag and the site content area has a class of site-content, so to set the primary content area to full width, use:

.home .site-content {
  width: 100%;
}

You’ll have to hide the sidebars too. If you want to hide all of them:

.sidebar {
  display: none;
}

If you’re using WordPress 4.7+, you can easily add CSS via the Customizer->Additional CSS.

Leave a Comment