admin管理员组文章数量:1305006
I need many "Reusable Blocks", but creating and maintaining them takes too long.
I'd like to do this:
- create a PHP-based "template" file, e.g.
wp-content/foo/bar.php
- create a page in the block editor, and insert/include that "template"
Is that possible somehow?
I need many "Reusable Blocks", but creating and maintaining them takes too long.
I'd like to do this:
- create a PHP-based "template" file, e.g.
wp-content/foo/bar.php
- create a page in the block editor, and insert/include that "template"
Is that possible somehow?
Share Improve this question asked Dec 15, 2019 at 6:07 lonixlonix 3011 silver badge10 bronze badges1 Answer
Reset to default 1Block Patterns probably will suit your needs. They're written in PHP, designed so you can create layouts (like a heading, gallery, and button together) but the content (e.g. what the text of the heading is, etc) is unique each time that you use them.
A good overview and roundup of how they're being used is at the Gutenberg Times.
本文标签: Use PHP templates as blocks
版权声明:本文标题:Use PHP templates as blocks 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741783606a2397452.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论