How To Change Width of Post Content Area In TWENTY TWENTY-ONE WordPress Theme

By default the post/page/category/archive content area’s width is less than header/footer/nav/post or page title’s width in the desktop view or large screen size. It’s fucking annoying, not sure why they would do that. Ideally the post etc content area should have same width as title, nav, header footer etc.

WordPress TwentyTwenty-One Theme Change Post Content Area
WordPress TwentyTwenty-One Theme Change Post Content Area

There is very simple way to change it. Just copy following code in your theme’s css or custom CSS in the theme customisation and it will be fixed in no time

/* Change the content width to be same as header/nav/footer's width */
@media only screen and (min-width: 822px) {
	:root {
		--responsive--aligndefault-width: min(calc(100vw - 8 * var(--global--spacing-horizontal)), 1240px);
	}
}

Comments

2 responses to “How To Change Width of Post Content Area In TWENTY TWENTY-ONE WordPress Theme”

  1. Jay Avatar
    Jay

    Great, but it creates and leaves a large area of blank space at the bottom of each page.

    1. Ajay Avatar

      You can control that with CSS. It’s better that you switch to 2022 theme which is awesome. Get rid of any old WordPress theme.

Leave a Reply

Your email address will not be published. Required fields are marked *