Often you’ll have little bits of information you’d like to display on many pages of a site, not limited to just one entry. In this case we’ll add a brief description of the blog that can be shown beneath posts—this is a perfect use for a global set.
Just like the blog post, let’s start by adding a field for this description:
- Navigate to Settings → Fields.
- Choose + New group and create a group called
- With that Global Fields group selected, choose + New field.
- Give this new field the a name of
Site Descriptionand make it a Plain Text field that allows line breaks.
- Save the field.
Now let’s create a global set and add the Site Description field to it:
- Navigate to Settings → Globals.
- Choose + New global set.
- Give the new global set a name of
Site Information, then select the Field Layout tab.
- Choose + New Tab in the field layout designer, choose a descriptive name to your tab, and drag your Site Description field into that tab.
- Save the global set.
You’ll now see Globals in Craft’s main navigation. The site’s starting to take shape!
You’ve now added custom fields to a new field layout twice. This is a fundamental part of working with Craft as you decide what content is stored in different places. 👏
Visit Globals and add some kind of public description for this blog project.