Components are used to create custom posts. For instance to create a job portal your first step will be to create the component. To enter the details of component select the component option in the
Below is the fields that you are required to fill in while creating a component.
Add New Components.
Name and Description Section.
Name plural (required): Give a plural name to the component.
Name singular (required): Provide a singular name to the component
Slug (required): Give a plural slug to the component
Description: Make a description in about two to three lines.
Set Template Section
Template Designing is the second step after creating the component. It allows you to create two types of views one is Single and second is Archive view (to show the list view).
After designing the templates you can set the templates to the component for which it is designed.
It allows you to assign names to the available list of different fields below.
- Add New: It is
label foradd new text. The default is Add New for both hierarchical and non-hierarchical types.
- Add New Item: It is the label
foradd new item text. Defaultis Add New Post/Add New Page.
- Edit Item: It is a label for edit item text.
Defaultis Edit Post/Edit Page.
- New Item: It is
labelfor new item text. Defaultis New Post/New Page.
- View Item: It is a label for view item text. The default is View Post/View Page.
- Search Items: It is a label for search items text.
Defaultis Search Posts/Search Pages.
- Not Found: It is a label for not found text.
Defaultis No posts found/No pages found.
- Not Found In Trash: It is a label for not found in trash text. The default is No posts found in Trash/No pages found in Trash.
- Parent Description: It is a label for parent text. This string isn't used on non-hierarchical types. In hierarchical
onesthe default is Parent Page.
- All Items: It is a label for all items text used in the menu.
Defaultis the Name label.
- Enter title here: It is a label for text used as the placeholder of
posttitle. Defaultis the "Enter title here".
Taxonomies are used to classify the custom fields. After creating taxonomies you can select the type of taxonomy to be used with the component i.e it can be either categories or tags.
These fields allows you add additional details to the components. You can check or uncheck the fields as per your requirement.
Below is the list of sections that can be displayed when editing the current component.
Title: Text input field to create a post title.
Editor: Content input box for writing.
Comments: Ability to turn comments on/off.
Trackbacks: Ability to turn trackbacks and pingbacks on/off.
Revisions: Allows revisions to be made of your post.
Author: Displays a dropdown menu for changing the post author.
Excerpt: A text area for writing a custom excerpt.
Featured Image: Allows to upload a featured image to the post.
Custom Fields: The native WordPress custom post fields list. If you don't select this, Types post fields will still display.
Page Attributes: Menu order and page parent (only available for hierarchical posts).
Post Formats: A selector for the format to use for the post.
Some more options are there which you can check or uncheck as per your requirement.
- Rewrite: You can Rewrite permalinks in either normal WordPress URL logic or a custom URL format. False to prevent rewrite. Default: true and use post type as a slug.
This option allows permalinks to be prepended with the front base. Example: if your permalink structure is /blog/, then your links will be: false->/news/, true->/blog/news/. Defaults to true.
- Feeds: Defaults to has_archive value.
- Pages: Defaults to true.
- has_archive: It allows to have custom archive slug for CPT. Default: not set. The input field is optional. The default is the value of rewrite or CPT slug.
- show_in_menu: Whether to show the post type in the admin menu and where to show that menu. Note that show_ui must be true. Default: null. Optional (Input Field). Top level page like 'tools.php' or 'edit.php?post_type=page'
- show_ui: Generate a default UI for managing this post type. Default: The value of
- publicly_queryable: Whether post_type queries can be performed from the front end. Default:
- exclude_from_search: Whether to exclude posts with this post type from search results. Default: The value of the opposite of the public argument.
- hierarchical: Whether the post type is hierarchical. Allows Parent to be specified. Default: false.
- can_export: Can this post_type be exported. Default: true.
- show_in_nav_menus: Whether post_type is available for selection in navigation menus. Default: The value of
- query_var: Disable to prevent queries like "mysite.com/?post_type=example". Enable to use queries like "mysite.com/?post_type=example". Enable and set a value to use queries like "mysite.com/?query_var_value=example". Default: true - set to $post_type.
- Optional (Input Field): String to customize query var
- Permalink epmask (Input Field): Default value EP_PERMALINK. More info here link.
- show_in_rest: Whether to expose this post type in the REST API. Default: true.
- Rest Base (Input Field): The base slug that this post type will use when accessed using the REST API. Default: $post_type.