-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add a template via a plugin (podcast, woo, LMS) #189
Comments
This is the original issue WordPress/gutenberg#41401 |
This comment was marked as spam.
This comment was marked as spam.
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. |
Chiming in here that this PR is very much underway: WordPress/gutenberg#61577 |
I'm working on this here: https://docs.google.com/document/d/1df9U3h5umMpbIEXRp4K38F9oFXDRPAi_4VPvt0houGg/edit?usp=sharing Test code currently here: https://github.com/justintadlock/devblog-plugin-templates |
That's really cool, @justintadlock! Thanks for working on this. I see you used the |
@Aljullu - Because the files have PHP code in them for things like internationalization. This is pretty typical when building default templates. |
Oh, right, I missed the PHP snippets in some of them. It makes sense. 👍 |
This one is ready for its first review: https://docs.google.com/document/d/1df9U3h5umMpbIEXRp4K38F9oFXDRPAi_4VPvt0houGg/edit?usp=sharing @Aljullu - Any technical feedback you'd like to share is more than welcome as well. Note: If testing code, this requires Gutenberg 19.1. Also, the post cannot be published until that version of Gutenberg is live. |
I didn't test the code examples, but I read through it and everything looks good. Thanks for writing it, @justintadlock! |
@justintadlock I completed the first review of the article and added a few comments. Looks great. |
Moving this to second review. We still have a couple of comments from the first review waiting for clarification/feedback in this ticket: WordPress/gutenberg#61577 |
Finished second review. Just tiny little nitpicks. It's ready to publish |
Social copy:
|
Social post scheduled for September 4. |
Discussed in #185
Originally posted by bph December 14, 2023
This question came up quite a bit in the last few months. Example
It might not be possible, as I still see this issue open: Add support for adding templates and template parts for plugins #42362
So this is more a placeholder Topic idea, when this is worked out in core.
The text was updated successfully, but these errors were encountered: