6

I'm trying to convert my sites to Gutenberg. I like it!!

But how do I make it possible to make category-descriptions using the new editor?

Gutenberg editor in category description

0

3 Answers 3

3

This isn't possible at the moment, Gutenberg is a post editor that relies on REST API endpoints, it's not an arbitrary content area editor as TinyMCE is.

Given some modification though it could be made to work with a custom data model and be a replacement, but it's not a trivial task, and what's involved is in flux. It would be best to ask over on the Gutenberg GitHub issue tracker

3
  • There is at least one ticket: #12511, where the team said this is something for phase 2. Tom, given your work and your talk at WCEU, do you happen to have some experience in this now?
    – kero
    Commented Oct 8, 2019 at 15:04
  • Any new updates on this?
    – klewis
    Commented Aug 12, 2021 at 15:06
  • this is the closest to an answer one can expect developer.wordpress.org/block-editor/how-to-guides/platform/…, there's no direct equivalent of the classic wp_editor tinyMCE instance that can be dropped in. I've tried to do similar things to approximate it, the answer tends to be JS based. More often than not a block based world means that you would never need to consider the need for this in the first place as the paradigm has changed
    – Tom J Nowell
    Commented Aug 12, 2021 at 15:43
0

I had been able to do this, more or less, by:

  1. Creating the content and format I wanted within the Guttenberg editor in a post
  2. Switching from the visual to the code editor
  3. Copying the code across into the "Archive Intro Text" of the category using the text - not visual - editor

The update to WP 5.7 from 5.6.2 has however messed up the formating

As you can see I'm in no way competent to write code and have created for myself a lovely dead end with my workaround, but I thought the knowledge might be useful, and I for one would be very grateful if this functionality was included in future releases.

1
  • Hello. Welcome to WPSE. This site consists almost wholly of people who developed with WordPress. For future requests, bug supports, and general support, you might be better off with the WordPress support site perhaps using the tag "Feature request" in the forums there. However, if you want help updating your hack, consider rewording your question to explain the output you now get and what you have tried to fix it so far. Commented Mar 13, 2021 at 9:56
0

You can create a custom post type and connect it to the term via a custom term_meta where you store the custom_post_type ID ie: with acf plugin display this post_content where you want with

$_your_meta_value=get_term_meta($term_id, _description, 1);
echo apply_filter('the_content',get_the_content(null,false,$_your_meta_value));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.