Sauter la navigation

[Résolu] Post excerpt in view shows Divi shortcodes instead of content

This support ticket is created Il y a 1 année et 8 mois. 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
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+01:00)

Ce sujet contient 1 réponse, a 2 voix.

Dernière mise à jour par Nigel Il y a 1 année et 8 mois.

Assisté par: Nigel.

Auteur
Publications
#2640739

Hi,

I'm building a custom post archive on this Divi website, but the excerpt shows the shortcodes Divi uses for their layout instead of the post content. See lien caché.

#2640929

Nigel
Supporter

Les langues: Anglais (English ) Espagnol (Español )

Fuseau horaire: Europe/London (GMT+01:00)

I think that is unavoidable when automatically generating the excerpts.

Divi uses shortcodes in the post content for all of its layout (rows, columns etc.) and modules.

If no manual excerpt is available and an excerpt is automatically generated to a limited length (of characters, or words), the likelihood is that some Divi shortcodes will be truncated and incomplete. Complete shortcodes would be rendered before the excerpt is output, but the truncated Divi shortcodes cannot be rendered, they are broken, and so they are displayed as if they are part of the normal text.

And because the truncation could happen anywhere within a Divi shortcode, it is not possible to provide some code workaround.

The only solution is to provide manual entries for the excerpts when editing the original posts.

#2640937

Hi Nigel,

Ok, I was hoping there was a block which supported some kind of raw output which would just show the text, but manual excerpts is a good workaround so thanks for that.