Custom fields are pieces of information that WordPress lets you add to content. Custom fields simplify both content administration its display. In the WordPress admin, writers see the fields as separate items with their descriptions. To display custom fields on the front-end, developers should design templates.

Custom fields in the WordPress admin Custom fields on the site’s front-end

Custom fields make it easy for you to edit content. Each item appears in a separate field.
Custom fields make it easy for you to edit content. Each item appears in a separate field.

You can see the custom fields displaying on the front-end. Design the template once and it displays the fields of each post.
You can see the custom fields displaying on the front-end. Design the template once and it displays the fields of each post.

How to add custom fields to content

Toolset Types plugin makes it easy to create custom content and to add fields to it. You can add fields to both “posts” and “users”.

The following steps show how to add custom fields to posts:

  1. Create the custom post types that you need.

    Toolset Dashboard
    Toolset Dashboard

    Once you’ve created custom post types, they will appear in Toolset Dashboard.

  2. Click on the button Create field group and then on Add New Field to add fields to the group.

    An fields group with no fields yet
    An fields group with no fields yet
  3. Choose the kind of fields to insert.

    Different kinds of WordPress custom fields available in Toolset
    Different kinds of WordPress custom fields available in Toolset
  4. Set options for the field.

    Details for a field
    Details for a field

    All fields require a name and slug (the “machine name”).

    Some fields have additional settings, for example, some can be set to be repeating fields. Please note that not all types of fields have the same additional options. For example, the Checkbox, Checkboxes, Radio, Select, and WYSIWYG fields cannot be repeatable.

  5. Save the fields group, after you’ve added all the fields to it.

    Fields group with a few fields
    Fields group with a few fields
  6. After you save the fields group, it will appear when editing content.

    The custom fields in the WordPress content editor
    The custom fields in the WordPress content editor

Displaying custom fields on the site’s front-end

Now that you know how to add custom fields to the WordPress admin, it’s time to learn how to use them on the front-end.

If you are comfortable editing PHP, you will be able to display the custom fields on the front-end using Types PHP API. You can display custom fields without writing PHP using the full Toolset package. We offer refunds for up to 30 days for Toolset, so you can try it, risk free.

Continue reading: