-
Notifications
You must be signed in to change notification settings - Fork 8
Creating a Post Type
You can create a new post type by navigating to Ultimate Fields » Post Types in the admin.
Below you can find an overview of the fields on the page.
Slug is the slug that the post type will be registered with. Later, it will be used for querying the posts of the post type, as well as the default URL rewrite rules.
Icon is the icon, which will be shown in the dashboard menu.
Plural name and Singular name will be used to generate the labels for the post type by replacing them in all needed strings. You may choose to Fine-tune labels if you would like to enter specialized strings for any of them.
This section allows you to toggle flags & settings for the post type. Please read the Function Reference/register_post_type article at the Codex to read about those settings.
If you choose to Enable URL rewrites for the new post type, you an adjust what slug should be used for it and whether the blog front should be used or not.
The Fields tab allows you to quickly add fields to the newly created post type.
Consider this a shortcut method: You may still create a new container and manually assign it to the new post type, but the "Fields" tab requires less steps to do so. The downside of using it is that the fields, which you create, will be shown without the ability to select any location rules for them.
This tab allows you to:
- Select what template to use for the post type. You may choose to use the existing template of an existing post type (like posts).
- Content to display before the standard content of the post type, as well as content to display after it.
You can use the [value]
shortcode, provided by Ultimate FIelds to format the data here. It accepts the same arguments as the_value
and loads them for the current post.
Example for the Before Content field:
<p>This event starts on [value key="event_start"] and finishes on [value key="event_end"].</p>
Quick start
- Creating fields and using their values
- Installation
- Administration interface
- Using the PHP API
- Container Settings
Locations
- Overview & Usage
- Post Type
- Options Page
- Taxonomy
- Comment
- User
- Widget
- Shortcode
- Menu Item
- Attachment
- Customizer
Fields
- Fields
- Text
- Textarea
- WYSIWYG
- Password
- Checkbox
- Select
- Multiselect
- Image Select
- File
- Image
- Audio
- Video
- Gallery
- WP Object
- WP Objects
- Link
- Date
- DateTime
- Time
- Color
- Font
- Icon
- Map
- Embed
- Number
- Sidebar
- Complex
- Repeater
- Layout
- Section
- Tab
- Message
Features
- Adding fields to the Customizer
- Conditional Logic
- Front-End Forms
- Administration columns
- Import and Export
- REST API
- JSON Synchronization
- Yoast SEO
Ultimate Post Types
Functions and API
Tutorials