Saltar navegación

[Resuelto] Implement "Read more.." on WYSIWYG field with inline expansion

This support ticket is created 4 years, 7 months ago. 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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Zona horaria del colaborador: America/Jamaica (GMT-05:00)

Este tema contiene 1 respuesta, tiene 2 mensajes.

Última actualización por Shane 4 years, 7 months ago.

Asistido por: Shane.

Autor
Mensajes
#2195761
Zrzut ekranu 2021-10-14 o 14.40.40.png
Zrzut ekranu 2021-10-14 o 14.40.34.png

I have custom WYSWIG field with long decription - formated text.

I'm now displaying the field with 'Single field' block but I'd like to show only the first 'x' words with "Read more" functionality.

I've seen the topics on this forum with using shortcodes for the except, but there are two problems with it:
- I'm losing all my formatting from the field - no bold, italic etc
- "Read more.." is not causing to automatically expand the rest of the text inline.

I want to get the result that clicking on "Read more" will expand the field (probably with some JS).
How can I achieve it?

#2196157

Shane
Colaborador

Idiomas: Inglés (English )

Zona horaria: America/Jamaica (GMT-05:00)

Hi Marcin,

I'm now displaying the field with 'Single field' block but I'd like to show only the first 'x' words with "Read more" functionality.

This is not something that is natively possible with our Toolset plugins and as such will require some amount of custom coding to achieve. Fortunately I was able to provide some resources to a previous custom who in turn was able to resolve the issue with the document below.
enlace oculto

Please let me know if this is was able to assist you.

Thanks,
Shane