DOCS

Fields overview

In WordPress, post type fields refer to the specific data fields associated with different types of content, known as post types. Each post type has its own set of fields that determine the information and structure of the content being created.

Some fields are native to WordPress, and various custom field types are made available by Voxel to cover different use cases.

You can edit the fields for a post type in WP admin ➝ Structure ➝ Post types ➝ Edit ➝ Fields

Preset fields

The preset fields are a list of fields that are most commonly used in various post types. Some of these are native to WordPress, and some are presets of Voxel custom fields

  1. Title: The title field, native to WordPress
  2. Featured image: Naive to WordPress
  3. Description: The content of the post, native to WordPress
  4. Location: Preset of Location field. The address and coordinates added to this field are used for location search and displaying markers on the search results map.
  5. Email: Preset of Email field
  6. Logo: A preset of Image field. Logo is utilized by various widgets such as Timeline, Quick Search, Messages.
  7. Cover image: A preset of Image field.
  8. Gallery: A preset of Image field.
  9. Website: A preset of URL field
  10. Phone Number: A preset of Phone field
  11. Event date: A preset of Recurring date field
  12. Work hours: A preset of Work Hours field
  13. Time zone: Time zone selection intended to be combined Work Hours field
  14. Product: Used to assign a product type, learn more
  15. Profile Picture: Available for Profile CPT only, synced with WordPress user avatar
  16. Profile name: Available for Profile CPT only, synced with WordPress Display name

Custom field types

  1. Text
  2. Number
  3. Switcher
  4. Text editor
  5. Taxonomy
  6. Phone
  7. URL
  8. Email
  9. Location
  10. Work hours
  11. Image
  12. File
  13. Repeater
  14. Recurring date
  15. Post relation
  16. Date
  17. Time
  18. Select
  19. Multi select
  20. Color

Layout fields

  1. UI Image
  2. UI Heading
  3. UI Step
  4. UI HTML

Learn more about Layout fields

General field options

Some of the general options when adding a field can include:

  • Field name:
    The name or the title of the field
  • Field key:
    The key is a unique identifier used when data is stored in the database. The field key should be unique and cannot contain any spaces or special characters.
    Changing the key is equivalent to creating a new custom field, and content will be lost. So it’s recommended to define the key when you first configure the post type and avoid changing it later.
  • Description: Lets you include a short description to describe the field
  • Is required?: Make this field mandatory during submission in front-end. Field validation is skipped when adding posts via back-end.
  • CSS classes: Add CSS classes to the field. Multiple classes should be separated with spaces.

Different field types include additional options unique to them, which we will cover in other articles.

Continue reading