Skip Navigation

[Resolved] formating in an excerpt

This support ticket is created 3 years, 9 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.

Our next available supporter will start replying to tickets in about 2.24 hours from now. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 4 replies, has 2 voices.

Last updated by Steve 3 years, 9 months ago.

Assisted by: Christian Cox.

Author
Posts
#1725637

I need to maintain some formatting in the post excerpt for this site. I followed the instructions here
https://toolset.com/forums/topic/maintain-formatting-in-post-excerpt-field/#post-360326
but this is pretty old and seems to no longer work.

Should it or is there a more current solution i could try

Thnaks

#1725955

This shortcode still works to some extent, but I haven't tested it thoroughly. I tested with some paragraph tags in text content, and those are maintained as expected. What is the exact content in your post excerpt, and where have you placed the get-excerpt shortcode? What is the output on the front-end of the site?

#1726031

Christian thanks. I get no output at all from the short code. Im using it in a simple view like this

<wpv-loop>
<div class="one-half post-excerpt" id="[wpv-post-title]">
[wpv-post-featured-image size="large"]
<div class="post-excerpt-content">
<span class="post_date">[wpv-post-date]</span>
<h3> [wpv-post-title output="sanitize"]</h3>
[get-excerpt post_id = "[wpv-post-id]"]
<br/>
Read More >
</div>
</div>
</wpv-loop>

And the formatting im losing is just and a <br /> So nothing to complex.

Oh am i misunderstanding how this works. Does this work to create an excerpt from te main content- or just allow formatting on an explicitly entered excerpt?

#1726165

As I understand it, this custom shortcode is only for explicitly entered excerpts because it reads the excerpt information directly from a post object from get_post. If no excerpt is explicitly provided in the post editor, the post_excerpt information returned by get_post will be blank for this post.

#1726221

Thanks Christian- I'll use that function and short code and go through and hand craft excerpts. Appreciate the clearification

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