Custom fields are a great way to add additional content, whether manually or automatically, to your articles. Custom fields can be applied to the general article creation template. So if you want to change this content from article to article you can easily type or click to add supplemental information. A popular use case for custom fields are movie and book reviews. Every book will have a title, author, and other publication information. Likewise, movies would have a title, director, and other metadata. You can create custom fields for this kind of information and simply fill it out for each article so you can reduce redundancy in your article creation process.
How to Create Custom Fields in Joomla 4
Follow along with the steps below to learn how to create your own custom fields in your Joomla site:
- Log into your Joomla admin area
- Click Fields under Content
- Click New
- Provide a title
- (Optional) Select category on which you want your fields to appear
- Click Save & Close
Those are the basic settings you will need to provide a simple text field to appear on your content. But there are more advanced options you can provide to get even more custom options.
The label field is the part of your custom field that will appear on your article when published, as in this example with a plain text field:
<Label>: <Default value>
Default value describes the content that will appear in the text field until you edit it.
Different Types of Custom Fields
In the example above, you saw the standard “Text” field, which has two important variables: label and value. This is the most basic type of custom field content you can create for you article. But there are more advanced fields that allow you to get more creative.
You can use lists, checkboxes, images, colors, SQL queries, and even a calendar and editor window. Try out different fields and see how you can mix and match them to introduce different content into your articles.
How to Add Custom Fields to Articles
Now that you know how to create custom fields, it’s time to learn how to add these fields to your articles so you can introduce different types of additional content and metadata.
Remember when you created your custom field you had the option of associating that field with particular categories or all categories. By default, the field will be available in all categories. This means all articles will have your fields available. However, if you chose a specific category just make sure that the desired category is selected in order to access your field.
- Log into your Joomla admin area
- Click Articles under Content
- Create a new article or edit existing
- Click the Fields tab
- Fill in or select your value (depending on the field used)
- Click the Field button to select the field you want to add to your article
Now, if you used a standard text field, this is the result you will see on the article:
Well done! You now know how to create custom fields and add them to articles in your Joomla site.