Skip Navigation

[Resuelto] Using a block in a custom field

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem:

I am trying to add a block type called "Open Sheet Music Display" as a custom field within a custom post type (music-styles). I attempted using a WYSIWYG and multi-line custom field, but they do not allow adding blocks. It seems I can only use Gutenberg blocks outside of custom fields.

Solution:

Blocks are a native feature of the WordPress editor and cannot be used within custom fields. Toolset cannot recreate block functionality inside custom fields because custom fields are standard WordPress features that do not support block content. You can only use blocks inside the main content editor.

This support ticket is created hace 2 meses, 1 semana. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Christopher Amirian hace 2 meses, 1 semana.

Asistido por: Christopher Amirian.

Autor
Mensajes
#2746698
Screenshot 2024-09-15 090631.png

Tell us what you are trying to do?
I have a block type called Open Sheet Music Display, for the sake of consistency while creating a custom post type (music-styles), I would like to have a custom field names music-notation that uses that block type. It appears that I can only use Gutenberg outside the custom fields.

I've tried adding a wysiwyg field and a multi line, but they won't allow me to add a block.

Is there any documentation that you are following?
No
Is there a similar example that we can see?
enlace oculto

What is the link to your site?
dev.salsablanca.com

#2747078

Christopher Amirian
Supporter

Idiomas: Inglés (English )

Hi,

Unfortunately, it is not possible to have a block inside the content of a custom field.

Blocks are the feature of the native WordPress editor that is available as a block editor inside the content.

The toolset can not recreate such a feature inside the custom fields.

Just to make sure we are on the same page, Toolset adds a GUI layer over the custom fields so you can easily add content such as multi-line, single line, date ....

However the underlying code itself is a normal custom field of the WordPress platform.

WordPress itself does not allow to add a block as a custom field.

Hope I could explain the details.

Thanks.

#2747270

I suspected that was the case. Thanks.