Pilih Laman

sumber : How to Change Fonts in WordPress: Complete & Easy Guide (hostinger.co.id)

 

How to change fonts in WordPress using CSS requires you to write a few lines of code. You can do this through the editor or Customiser. However, it is best to use a customiser because it will be easier.

  1. Log in to the WordPress dashboard, then select Appearance Customise.
    Customization menu in WordPress sidebar
  2. Choose Additional CSS
    Selecting CSS additionally

You can add a line of code to the box on the left.

  1. To replace the entire font:
    body {
    font-size: 1.25m;
    }

    How to change font size in WordPress with CSS

  2. To change the paragraph font:
    p {
    font-size: 25px;
    }

    CSS additional for how to change fonts in WordPress

  3. To replace a specific heading font
    h2 {
    font-size: 2.5em;
    }

    Replacing the heading font with additional CSS

  4. To modify the sidebar font size:
    .sidebar li {
    font-size: 12px;
    }
  5. To customize the footer font:
    .footer {
    font-size: 150%;
    }
  6. To change the font size on a specific screen:
    html {
    font-size: 18px;
    }
    @media (min-width: 900px) {
    html {
    font-size: 20px;
    }
    }

Customize css styles using four units to set the font size of the text:

  • Em (em). Used on web media documents. 1 em equals 12 points.
  • Pixels (px). Used on display media. 1 px equals 1 dot on a computer screen.
  • Point (pt). Units for traditional print media. 1 point equals to 1/72 inch.
  • Percent (%). The default is 100%, which will change after zooming in or out.