• representativeself

    (@representativeself)


    I’ve set up a custom post type and want to display the data on a single page template. Within the Twenty Twenty-Four theme, I’m editing the single page template for my custom post type but where can I find the CPT fields when editing the template? I can’t seem to find any blocks for my fields. Do I need to enable these anywhere?

Viewing 1 replies (of 1 total)
  • Hello @representativeself,

    You can create templates for custom post types (CPTs) directly within the Site Editor by navigating to Appearance > Editor. In the left Navigation Sidebar, select Templates. To make your custom post type appear in this list and create custom templates for it, ensure it’s registered with 'show_in_rest' => true. This setting allows the CPT and its fields to be accessible in the Block Editor.Steps to Create a Template for a Custom Post Type:

    1. Add a New Template:
      • Click on the plus icon (+) to add a new template. You’ll see a scrollable modal window with available template types.
      • If a specific template already exists, it won’t appear in the list. In this case, you can edit or delete the existing template instead.
    2. Choose from Template Options:
      • You can create templates for different purposes, including:
        • A default template for all items of the post type.
        • A single item template for individual posts of that type.
        • An archive template for listing all items of the custom post type.
        • A taxonomy archive template for displaying items under specific taxonomies.
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.