跳到内容

Styleguide – Custom Fonts and Colors

v1.8.1

binarymoon · 2015年1月10日 上架

Styleguide allows you to customize fonts and colors in WordPress themes through the Customizer - no need to touch any code!

正在使用
2,000+
评分
5.0 / 5
累计下载
9.8 万
最近更新
2024年1月30日
7 条评价需要 WordPress 4.5+已测试到 6.5.0

贡献者

截图

An example of Twenty Eleven having it's fonts changed
An example of Twenty Eleven having it's fonts changed
Twenty Thirteen with some alternate colors
Twenty Thirteen with some alternate colors

Quickly and easily edit fonts and colors in your WordPress themes using the WordPress Customizer so that you can get live previews before saving the new settings.

Perfect for giving your website a unique look without having to hire a designer or make code changes yourself.

All default WordPress themes are fully supported and support for more themes will be added in the future. All other themes can customize fonts.

Styleguide uses a carefully chosen selection of the top 45 Google Fonts to give you a lot of options for personalising your site.

Features

  • Choose from a varied selection of the top Google fonts in any theme
  • Additional themes (listed below) support editing colors
  • Filter fonts based on character set – great for non latin languages such as Russian
  • Developer functionality for adding support to other themes, and for adding additional fonts.

Supported Character Sets

Styleguide supports fonts that have a variety of different character sets. This makes selecting a font for your language super easy. The supported character sets are:

  • Cyrillic
  • Devanagari
  • Greek
  • Hebrew
  • Latin
  • Vietnamese

By default Styleguide uses Latin. To limit the font choice to those supporting your character set you should go to Settings → General → Character Set and select your set there.

Supported Themes

Developers can add support for their themes quite easily – see the ‘Other Notes’ tab for more info.

If you’re in the market for a WordPress theme then you could check out my Premium GPL WordPress themes site here: https://prothemedesign.com/

How To

After downloading and installing the plugin you can go to the Customizer (Appearance > Customizer) and edit fonts and colors in the ‘Colors & Fonts’ panel.

Adding Theme Support

Styleguide allows any theme to add support through the add_theme_support command. For examples check out the theme-styles directory.

I have added an example of a basic implementation below. This code would be placed in your themes functions.php

function prefix_add_styleguide_support() {

  // for properties check out the included theme styles as seen here:
  // https://github.com/BinaryMoon/styleguide/tree/master/theme-styles
  $properties = array(
    ...
  );
  add_theme_support( 'styleguide', $properties );

}

add_filter( 'after_setup_theme', 'prefix_add_styleguide_support' );

Extra Fonts

Styleguide currently offers developers a filter for adding additional fonts. You can use it as shown below

function my_fonts( $font_list ) {
    $font_list['Cormorant Infant'] = array(
        'name' => 'Cormorant Infant',
        'family' => '"Cormorant Infant", serif',
        'weight' => '400,700',
        'sets' => array( 'latin' ),
    );
    $font_list['Poppins'] = array(
        'name' => 'Poppins',
        'family' => 'Poppins, sans-serif',
        'weight' => '400,700',
        'sets' => array( 'latin' ),
    );
    return $font_list;
}
add_filter( 'styleguide_get_fonts', 'my_fonts' );

Plums

按场景查找 WordPress 插件。安装量、评分和兼容版本来自官方目录。

导航

说明

WordPress 是 WordPress Foundation 的商标。本站与 WordPress Foundation、Automattic 没有隶属关系。这里不托管插件文件,下载和安装以 WordPress.org 上的页面为准。

© 2026 Plums