Support » Developing with WordPress » Create Custom Tags with Blocks?

  • Resolved tompkinsjournal

    (@tompkinsjournal)


    Is it possible to create a custom tag using blocks within the Gutenberg editor? I want to increase the size of the tag description field to include something like Yoast.

    https://yoast.com/tag/content-seo/

    • This topic was modified 1 month ago by Jan Dembowski. Reason: Moved to Fixing WordPress, this is not an Developing with WordPress topic
Viewing 8 replies - 1 through 8 (of 8 total)
  • Moderator t-p

    (@t-p)

    tompkinsjournal

    (@tompkinsjournal)

    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.

    Moderator Samuel Wood (Otto)

    (@otto42)

    WordPress.org Admin

    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.

    tompkinsjournal

    (@tompkinsjournal)

    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.

    Joy

    (@joyously)

    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.

    tompkinsjournal

    (@tompkinsjournal)

    Thanks, Joy.

    Update: I found a solution to add blocks to the tag/category description.

    1) Install the “HTML in Category Descriptions” plugin.
    2) Open new post/page to get to the Gutenberg editor.
    3) Create the design you want.
    4) Switch to the “Code” view.
    5) Copy the code.
    6) Paste into description text area for category or tag.

    Moderator t-p

    (@t-p)

    Thanks for posting solution 🙂

Viewing 8 replies - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.