WordPress / developer-blog-content

In this GitHub space, WordPress team coordinate content to be published on the Developer Blog. Discussion and montly meetings (first Thu) in WP Slack #core-dev-blog
36 stars 2 forks source link

How to add a template via a plugin (podcast, woo, LMS) #189

Open bph opened 6 months ago

bph commented 6 months ago

Discussed in https://github.com/WordPress/developer-blog-content/discussions/185

Originally posted by **bph** December 14, 2023 This question came up quite a bit in the last few months. [Example](https://twitter.com/Kathy_Darling/status/1731637473342624112) It might not be possible, as I still see this issue open: [ Add support for adding templates and template parts for plugins #42362](https://github.com/WordPress/gutenberg/issues/42362) So this is more a placeholder Topic idea, when this is worked out in core.
bph commented 6 months ago

This is the original issue https://github.com/WordPress/gutenberg/issues/41401

petrio-seo commented 5 months ago

These Fukken Feelings Podcast©. You can find us on ALL Podcast Platforms and don't forget to follow us on all social media platforms @fukkenfeelings to stay up-to-date on all new episodes and behind-the-scenes content.

justintadlock commented 4 months ago

I have a solution for this: https://gist.github.com/justintadlock/cfcdcdf47ea785e84c8575dddc68ea37

There are several possibilities that could be explored based on the code in that Gist. It's specific to virtual pages, which is what I'm assuming is the biggest pain-point. But there are things that plugins can do now to make their "regular, non-virtual" templates editable in a block theme.

Anyone is welcome to take this code and run with it. I don't know what kind of bandwidth I'll have to fit another tutorial into my schedule in the immediate future, so I'll leave this topic unclaimed. But if no one picks it up, I'm OK with adding it to my list after the WP 6.5 update is out.

justintadlock commented 3 months ago

Just an update from my end: I still have #238 and #239 to work through over the next few weeks. After that, I'm happy to take this one on. It might be mid-to-late April. But I'll leave this unassigned in case someone wants to try their hand at it.

annezazu commented 4 weeks ago

Chiming in here that this PR is very much underway: https://github.com/WordPress/gutenberg/pull/61577