• Nazar Hotsa

    (@bugnumber9)


    Looks like there’s no way to give a distinct name to a default page template in theme.json?

    I have 2 page templates: page.html and page-with-sidebar.html
    When I just add this to theme.json it works as expected:

    "customTemplates": [
    	{
    		"name": "page-with-sidebar",
    		"postTypes": ["page"],
    		"title": "Page With Sidebar"
    	}
    ]

    However, looks like I can’t give a custom name to the default page template because when I do this:

    "customTemplates": [
    	{
    		"name": "page",
    		"postTypes": ["page"],
    		"title": "Standard Page"
    	},
    	{
    		"name": "page-with-comments",
    		"postTypes": ["page"],
    		"title": "Page With Comments"
    	}
    ]

    It doesn’t work as I’d expect and I get this:

    Is this a bug or expected behavior?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘Default page template name in FSE theme’ is closed to new replies.