Keeping post text formatting when using EXCERPT (or using full post text)

Hello,

I’ve used the Looper commands to create a dynamic ‘latest news’ section on a clients site. Worked like a charm and adding in the GRID from the ELEMENTS (not The Grid or Essential Grid, just the regular Block Grid) to give greater flexibility over the item arrangements (headline, image, text) on breakpoints. All good there too.

The news posts are going to be quite short, three paragraphs or so, so it makes more sense to show the text in it’s entirety on this page, rather than having a hover-over hyperlink to a separate, dedicated POST page.

I can call in the EXCERPT of text from the POSTS as DYNAMIC content, and I can increase the length of the EXCERPT in the THEME OPTIONS to show all the POST text, of course.

However, in doing so the styling is stripped. So any bold, italic or paragraph breaks in the post itself are stripped and the text is one single blob. Not ideal.

There seems, to me, to be no simple way to pull just the POST text in by itself (an oversight perhaps as I’ve read a few requests where people have tried to do exactly that? – if I missed that please point me in the right direction).

Otherwise, can I add some THEMECO assisted custom jobbies/ digital alchemy to my child theme to get the EXCERPT to honour the original posts formatting, or preferably, pull in the POST content as is?

Look forward to your reply.

Hello @dmuller,

Thanks for writing in! Instead of using the {{dc:post:excerpt}} dynamic content to display the excerpt, you can use {{dc:post:the_content}} dynamic content. Having to use that way, the styling of the post contents will be intact.

Best Regards.

Thank you Ruenel. I’ll give that a try.

Could this be added to the list of possible options with dynamic content in the dropdowns? If not, does a complete list of all the possible dynamic content calls for posts exist anywhere for reference?

Best, David.

1 Like

Hi @dmuller,

I will check and if possible I will add this to the feature request list so our development team will take it into the consideration in future.

Thanks

2 Likes

Great idea, thanks again for your help. The section works faultlessly now.

Hi @dmuller,

Glad to know that it is working now.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.