lisa
(@contentiskey)
for a full site editing theme…..you can create multiple headers and footers to use for different templates. some full site editing themes come with a few options already created for header and footer template parts- you can mix and match header and footer template parts based on your project needs.
I am creating a full site editing theme. The problem is that when I add another footer called footer-with-button.html to the parts directory in my theme, it is added to general category of template parts. Only file footer.html is added to Footer category.
How can I add my new footer created via html file? It works if I create it from the admin part of the wordpress. There I can choose which template part I am creating.
Ok. I have found a solution. My second footer is named parts/footer-with-button.html
I just had to register it in the theme.json file like this:
"templateParts": [
{
"area": "header",
"name": "header",
"title": "Header"
},
{
"area": "footer",
"name": "footer",
"title": "Footer"
},
{
"area": "footer",
"name": "footer-with-button",
"title": "Footer"
}
]