WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.52k stars 4.2k forks source link

Templates: allow replacing theme templates with custom templates #61256

Open liviopv opened 6 months ago

liviopv commented 6 months ago

What problem does this address?

The template replacing/swapping option only works with templates bundled in the theme. User might want to design their own templates and use them to replace theme defaults using the options shipped in recent GB versions and WordPress 6.5

What is your proposed solution?

The "Transform Into:" option available in the inspector sidebar for Templates should surface custom templates.

annezazu commented 6 months ago

Ah ha. Just ran into this with template parts and I assume it's the same problem. +1 to this cc @scruffian

carolinan commented 4 months ago

I am not able to reproduce this, perhaps more information is needed.

1) I created a new custom template through the Site Editor > Templates new. 2) I created a new page and clicked on Template, and chose "Swap template". My custom template is available.

I am not sure what "Transform into" is. I do not see it in the interface.

If you meant the following flow:

  1. Activate Twenty Twenty-Four
  2. Go to Site Editor > Templates.
  3. Select and open the Blog Home template
  4. In the inspector, open the panel labeled "Design".
  5. View the optional designs.

If you meant that your custom template does not show under design, then these are not true theme templates, they are block patterns.

mrfoxtalbot commented 2 months ago

@carolinan, I think @liviopv meant the second thing:

https://github.com/Automattic/wp-calypso/assets/14153300/22f98b84-5ef8-42d5-9a78-b6532c9180c7

That said, the three-dot menu is no longer working on my test site (6.1.1 + Plugin 19.1.0)

https://github.com/user-attachments/assets/3e73b536-f65d-4377-8152-7db457481c4c

Am I doing something wrong here?