Skip Navigation

[Gelöst] Adding HTML markup to CPT description

This support ticket is created vor 6 Jahre, 1 Monat. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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)

This topic contains 2 Antworten, has 2 Stimmen.

Last updated by emilyT vor 6 Jahre, 1 Monat.

Assisted by: Minesh.

Author
Artikel
#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 hidden link (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! hidden link

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

Best wishes, Emily

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.