Skip Navigation

[Résolu] Adding HTML markup to CPT description

This support ticket is created Il y a 6 années et 7 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.

Aucun de nos assistants n'est disponible aujourd'hui sur le forum Jeu d'outils. Veuillez créer un ticket, et nous nous le traiterons dès notre prochaine connexion. Merci de votre compréhension.

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

Supporter timezone: Asia/Kolkata (GMT+05:30)

Ce sujet contient 2 réponses, a 2 voix.

Dernière mise à jour par emilyT Il y a 6 années et 7 mois.

Assisté par: Minesh.

Auteur
Publications
#627941

Hi folks

I've used the shortcode given in this thread to add a CPT description to its archive page: https://toolset.com/forums/topic/how-do-i-show-the-post-type-description-in-a-post-type-archive/

What I would like to do is mark up the description with paragraphs and other HTML to format it on the page. However, at the moment the tags are being rendered on the page - see here lien caché (scroll down to below the images).

Is there any way that I can add markup, or is there another way I can achieve this? I'm looking for a solution that will allow our client to be able to edit the description easily themselves - I think putting it directly in the archive itself would be too confusing for them.

I'll look forward to your response!
Cheers, Emily

#628219

Hi Emily,

Can you try

return html_entity_decode($obj->description);

Thanks.

#628277

Perfect, thanks Mohammed! lien caché

Thanks for your help with this, it's much appreciated.

Best wishes, Emily