最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Shortcode, vs blocks, vs templates - what would you do for choosing or creating custom post data in editor?

programmeradmin1浏览0评论

Say you have some custom post type. Call it my_type.

Now say in Gutenberg, you want to either

a. Insert some data into a my_type post from an existing instance of another_type where the inserted block has template/styling

or

b. Insert some data into my_type that will create the custom another_type post instance.

What is the most sensible methodology? You can imagine doing this with a forum post. In Gutenberg you want to insert some reusable block with styling that displays certain forum topic data. Or you want to insert a block that creates the forum topic in the first place.

As it is now, I am just creating the forum topic then using a shortcode with topic id, but can't help but wonder if there is a better way?

thanks! Brian

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论