Custom content types

Need something other than posts and pages, such as recipes, case studies or products? Build a content type. It gets its own admin screens, API, permissions and SEO automatically.

Creating a type

  1. Go to Content types. You need the settings › manage permission.
  2. Click New and give it a slug (e.g. recipes; this becomes /api/recipes), a name and a singular name.
  3. Choose whether it is hierarchical (has parents, like pages), and whether it has authors, categories and tags.
  4. Optionally set a URL pattern (e.g. /recipes/{slug}) so items get web addresses and sitemap entries, and a schema type for structured data.

Fields

Add fields to the type. Each field has a name (used by the website's code, and fixed once created), a label, and a type:

Text, textarea, rich text, number, date, boolean, select, multi-select, email, URL, image, file, gallery, relationship (links to other items) and repeater (a list of rows of sub-fields).

Fields can be required, have help text and settings such as limits or options. A rich text field has a toolbar setting: Full (headings, images and video, like the post body) or Basic (bold, italic, underline and strikethrough, like the excerpt), plus an optional maximum length. Use the move buttons to put them in order.

After creating it

  • The type appears in the sidebar for everyone with access. Roles that can work with Posts get the same rights on the new type.
  • Tell your developer the slug and the field names. The Connecting a website guide lists them for each type.
  • Custom types count towards your package's content type limit.