本文档介绍如何通过 theme.json 文件配置 WordPress 主题的全局设置和样式,涵盖从基础概念到高级功能的全面指南,适用于初学者和有经验的开发者。
Welcome to the Global Settings and Styles documentation. In this chapter you will learn everything you need to know about configuring settings, styles, and more via your theme’s theme.json file.
theme.json is a foundational piece of block theming. While it is not a strictly required file, you will need to work with it for nearly any theme project. It is useful for everything from configuring colors to defining default typography settings to applying front-end styles to your theme.
Use the below links to find the topic you are looking for in this chapter. Each section of the chapter is set up to offer a straightforward learning path toward learning the ins-and-outs of theme.json for first-time themers. But if you are already familiar with the foundational concepts, feel free to skip ahead to the topic you want to learn more about.
theme.json: A walkthrough of setting up your theme.json file, introducing you to the foundational concepts for configuring global settings and styles for your theme.theme.json. Sub-pages document every available setting.theme.json, which also integrate with the user interface.theme.json style variations, giving your users alternative designs to choose from.