WordPress Tricks

WordPress theme Twenty Twenty-One: Modifications and customizations of headers, fonts, styles and more

WordPress 5.6 comes with a brand new default theme: Twenty Twenty-One. Here I am sharing you some basic css or style modifications using which you can give it a look of your own. I have added the child theme below which you can download and use without any issue.

Download Twenty Twentyone Child theme.

wordpress theme twenty twenty-one
wordpress theme twenty twenty-one header background color
  1. If you want to change the background color of header area, also to control the top and bottom gap or padding of header area
header#masthead {
    max-width: 100% !important;
    padding-left: 10%;
    padding-right: 10%;
    background: red !important;
    padding-bottom: 2%;
    padding-top: 2%;
}
wordpress theme twenty twenty-one site title and site description modifications

2) If you want to change Site title and Site description or taglines font size color and font family

header#masthead .site-title, header#masthead .site-title * {
    color: darkred !IMPORTANT;
    font-size: 27px;
    font-family: cursive !important;
}
.site-description {
    color: darkred !IMPORTANT;
    font-size: 17px;
    font-family: cursive !important;
}
wordpress theme twenty twenty-one header logo and menu area centralized

3) If you want to centralized top title / logo and menu position

@media (min-width: 500px)  { 
header#masthead {
    display: block;
    text-align: center;
    float: none !IMPORTANT;
}
.site-branding {
    margin-left: auto;
    margin-right: auto;
    display: block;
    clear: both;
    float: none;
}
nav#site-navigation {
    text-align: center;
    float: none;
    margin-left: auto !IMPORTANT;
    margin-right: auto !IMPORTANT;
    /* margin-right: auto; */
    display: flex;
    position: inherit;
    justify-content: center;
}
}

4) If you want to change top menu font size, color and font family

@media only screen and (min-width: 482px){
.primary-navigation .primary-menu-container > ul > .menu-item > a {
    color: green !important;
    font-size: 18px !IMPORTANT;
    font-family: cursive !important;
}
}

To change hover menu color

@media only screen and (min-width: 482px){
.primary-navigation .primary-menu-container > ul > .menu-item > a:hover {
    color: darkred !IMPORTANT;
}
}
wordpress theme twenty twenty-one full width footer background color

5) If you want to use full width footer background color

footer#colophon {
    clear: both;
    width: 100% !IMPORTANT;
    max-width: 100% !important;
    padding-left: 10% !important;
    padding-right: 10% !important;
    background: red;
}
wordpress theme twenty twenty-one powered by centered

6) If you want to remove the Site Name and make the Powered By text centered

.powered-by {
    margin-left: auto !important;
    margin-right: auto !important;
}

7) To change Produdly Powered by text font size color and font family

.powered-by, .powered-by * {
    font-size: 15px;
    color: darkred;
    font-family: cursive !IMPORTANT;
}

8) To change the link color of Powered By text

.powered-by a {
    color: green !IMPORTANT;
}
wordpress theme twenty twenty-one remove left padding

9) If you want to remove the left padding of pages and make it full width (if this code doesn’t work please let me know in comments section)

.post-thumbnail, .entry-content .wp-audio-shortcode, .entry-content > *:not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce), *[class*=inner-container] > *:not(.entry-content):not(.alignwide):not(.alignfull):not(.alignleft):not(.alignright):not(.wp-block-separator):not(.woocommerce), .default-max-width {
    max-width: var(--responsive--alignwide-width) !important;
 
}
wordpress theme twenty twenty-one title modifications

10) If you want to change page or post title’s font size, color and font family

.singular .entry-title {
    font-size: 28px !important;
    color: darkblue;
    font-family: cursive;
}

11) If you want to reduce gap below the title

header.entry-header {
    padding-bottom: 20px !important;
}

12) If you want to reduce gap above title

header#masthead {
    padding-bottom: 23px !important;
}
wordpress theme twenty twenty-one comments section modifications

13) If you want to change font size color and font family of “Leave a comment”

h2#reply-title {
    font-size: 23px;
    color: darkblue;
    font-family: cursive;
}

14) If you want to change Comments Label font size color and font family

label[for="comment"] {
    font-size: 21px !IMPORTANT;
    color: darkred !important;
    font-family: cursive;
}

15) If you want to change “Post comment” button background and border color

#respond input#submit {
    border-color: red !IMPORTANT;
    background: red !important;
}
wordpress theme twenty twenty-one footer widget modifications

16) If you want to use background color in footer widget title, show bottom border, change font size color and font family — all in a single code I have shared, u can remove the line in code which you don’t want

h2.widget-title {
    font-size: 23px;
    color: darkred;
    font-family: cursive;
    border-bottom: 1px solid red;
    text-align: center;
    background: red;
}

17) If you want to remove the Underline which is showing in the links in widget area

.widget a {
    text-decoration: none;
}

18) If you want to change font size, color and font family in widget links

.widget a {
    font-size: 16px;
    color: blue !important;
    font-family: cursive !IMPORTANT;
}
wordpress theme twenty twenty-one footer site name and powered by info

19) If you want to change footer site info and Powered by info without using any plugins and using Child themes only

** In the screenshot above I have marked the portion where you can edit the child theme footer to add Powered by Info or Company info with site name.

If you need any help regarding this ask me in comments section. You can consult with me in my skype at om2000_cuet

36 thoughts on “WordPress theme Twenty Twenty-One: Modifications and customizations of headers, fonts, styles and more”

  1. Any thoughts on editing the logo size? I see weird css on it with –branding–logo–max-width, and I’m not sure where that gets set.

    Like

      1. I ended up find it. There were variables set in the parent I was able to override in my child theme:
        :root {
        –branding–logo–max-width: 450px; /*was 300*/
        –branding–logo–max-height: 150px; /*was 100*/
        }

        Like

  2. It would be so great if you also told us WHERE to put all that css code for us novices, it would be cool

    Like

  3. Hi, thanks for all information. Looking for a guide that to translate Twenty Twenty-One theme to another language because there is no pot file. How can I do that? Thanks.

    Like

  4. Thanks for this great info! I was able to remove the extra padding around the header. What about the footer – there seems to be a ton of padding there that I would like to get rid of, specifically the space in the “widget area” of the footer. (I have removed all widgets from this area and added just a text widget with contact information. There is a ton of blank space above this contact information that I would like to get rid of.)

    Like

  5. Is there a way to make the page titles show up? You can enter them in the block editor, but it’s not at all representative of what will actually show later as those titles vanish.

    Like

  6. Hello Om,
    Thank you for this wonderful article. But I can not still figure it out on my website How to change color for this excerpts text? As you can see on this page https://www.hot-hobby.events/events/
    Same problem on the sidebar as well. As I have dark background and below yellow titel excerpts text color and sidebar text and link color is grey so that is not readble!
    Maybe if you will select this text then you can read it. I just want to make this text white, so visitor can read it. Can you please help me for changing CSS for this?
    Thank you for your support.

    Like

    1. Hi Michael
      can u try these please

      .tribe-common–breakpoint-medium.tribe-events .tribe-events-calendar-list__event-description {
      color: white;
      }
      .tribe-events-widget-events-list__events, .tribe-events-widget-events-list__events * {
      color: white !important;
      }

      let me know if that helps

      Regards
      Om

      Like

      1. Thank you for your response. It worked but only on Sidebar. You can refresh the page then you can see the the excerpts which is below the yellow title of events color of that text did not changed! Also in Sidebar Title (Upcoming Events) did not change. I would appriciate help on that also.
        Thank you in advance for your help

        Like

      2. Hi Michael
        can u try this please

        .tribe-events-calendar-list__event-description, .tribe-events-calendar-list__event-description * {
        color: white !IMPORTANT;
        }
        This is for Upcoming Events

        h2.tribe-events-widget-events-list__header-title {
        color: white !IMPORTANT;
        }

        Liked by 1 person

  7. Thank you very much for your help. It has worked very nicely. You can also see by refreshing the page. But there still some grey text left on this page. For example Dates (left of the events), Ticket price which is next to the Get Tickets, And the place name which you can see below the yellow title of second Event.
    Which reads like this:
    Don’t look, just touch – Exklusiver Partyabend (Ausgebucht) (Yellow)
    Dein Fetichhaus Schoßbergstraße 16, Wiesbaden, Hessen (Grey, not readble)
    I hope I am not bothering you too much. But I really appriciate your help.
    Thanks a million.

    Like

    1. Hi Michael
      for the Date and price would u mind to try this please

      .tribe-events-calendar-list time, .tribe-events-calendar-list time *, .tribe-events-calendar-list span {
      color: white !IMPORTANT;
      }
      please let me know
      ** i found other portion seems readable now

      Like

  8. Sir, Using WP TwentyTwentyOne, to simply center the menu bar on https://quesara.com I have added your option #3 to the style.css in my child theme:

    @media (min-width: 500px) {
    header#masthead {
    display: block;
    text-align: center;
    float: none !IMPORTANT;
    }
    .site-branding {
    margin-left: auto;
    margin-right: auto;
    display: block;
    clear: both;
    float: none;
    }
    nav#site-navigation {
    text-align: center;
    float: none;
    margin-left: auto !IMPORTANT;
    margin-right: auto !IMPORTANT;
    /* margin-right: auto; */
    display: flex;
    position: inherit;
    justify-content: center;
    }
    }

    HOWEVER nothing changes! I have searched many recommendations, like:

    .site-header .main-navigation {
    text-align: center;
    }

    Still, nothing changes!

    Is there something on the site preventing centering the menu bar?

    Please Advise. With Gratitude, Jacob

    Like

      1. AllAboutBasic Om ~

        Indeed, that worked perfectly! Thank you for your fast and accurate reply!

        Could you perhaps comment on why the code did not work in the child theme’s style.css?

        With Gratitude, Jacob

        Like

      2. Hi Jacob
        nice to know it helped
        to tell you why style.css didn’t work i need to check the child theme codes you used.
        so could not tell u about it
        Regards
        Om

        Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s