WordPress / create-block-theme

A WordPress plugin to create block themes
https://wordpress.org/plugins/create-block-theme/
GNU General Public License v2.0
310 stars 44 forks source link

Allow editing template part names and categories from the editor #653

Open mikachan opened 1 month ago

mikachan commented 1 month ago

We should consider allowing users to edit template part names and categories and then save these changes to the current theme.json file.

e.g. This part of theme.json:

    "templateParts": [
        {
            "area": "uncategorized",
            "name": "comments",
            "title": "Comments"
        },
        {
            "area": "header",
            "name": "header",
            "title": "Header"
        },
        {
            "area": "footer",
            "name": "footer",
            "title": "Footer"
        }
    ],
creativecoder commented 1 month ago

It looks like you can name the template part and set the area when it's created:

Screenshot 2024-05-25 at 15 56 51

But when exporting the changes to the theme with Create Block Theme, only the template part file is created. The name, title, and area of the template part are not added to the templateParts key of theme.json.