Create Custom Tags with Blocks?



Interesting. However, I was hoping to find a way to create, perhaps, a tag.html in the experimental block-based theme — or a suitable plugin. Thanks.

In order to better answer your question, you probably need to define what you mean by “a custom tag”. The word tag is used an awful lot and has many meanings, so your question is somewhat unclear.

By “custom tag” I mean something along the lines of “tag-{slug}.php”. The difference is to create a three-column display for important posts I’d like to feature. It seems the Gutenberg block editor would do the trick. However, from scanning the codex, I may need to create something static in the tag.



The codex is old (and not up to date, and being migrated to /support), and the block editor is new (got into WP core in Dec ’18). The experimental site editing where you can use blocks for your entire site is not in WP core yet. You can try it out in the Gutenberg plugin, but it is not ready yet.
Meanwhile, you can always create a child theme with a template named to handle specific tags (tag-{slug}.php) or all tags (tag.php). It doesn’t matter which editor is being used for the template to be loaded for the tag pages. You will probably find that you don’t need special markup (blocks), but special CSS to change the layout. Be sure to test on different window sizes.

Source link