-
-
Notifications
You must be signed in to change notification settings - Fork 1
Registering block templates #346
Copy link
Copy link
Labels
area:contentAnything that needs copy-editing assistanceAnything that needs copy-editing assistancestatus:in-progressWork actively underwayWork actively underwaystatus:needs-devEarly execution signal (triage queue for engineering)Early execution signal (triage queue for engineering)
Milestone
Metadata
Metadata
Assignees
Labels
area:contentAnything that needs copy-editing assistanceAnything that needs copy-editing assistancestatus:in-progressWork actively underwayWork actively underwaystatus:needs-devEarly execution signal (triage queue for engineering)Early execution signal (triage queue for engineering)
Type
Fields
Give feedbackPriority
None yet
Projects
StatusShow more project fields
🏗️ In Progress
Description
We need to register three custom post types in the Tour Operator plugin: Tours, Accommodation, and Destinations. These post types will manage content related to the tours offered, accommodations available, and destinations covered within the plugin.
Requirements
register_block_template()function, ensuring compatibility with the block editor.register_block_pattern()with appropriate categories (e.g., tours, accommodation, destinations).Templates to Register:
Single Templates:
Archive Templates:
Term Archives
Search Results
References:
customTemplatesproperty in theme.json. It accepts an array of template objects, each defining an individual template.customTemplatesarray supports these properties:name: The name of your template file without the file extension.title: A human-readable title for your template, which may be translated.postTypes: An array of post type slugs that the template is usable on. This is an optional setting and defaults to thepagepost type./templatesfolder. Therefore, if you register a template with the name of example, you must also have an/templates/example.htmlfile in your theme.