• Using the Salient theme, I want to keep the linebreaks that are present in the post in the excerpt that is made from the post. Is there any way to do this?

Viewing 1 replies (of 1 total)
  • The theme isn’t responsible for the excerpts. The theme calls the WordPress function to get the excerpt, and WordPress first looks for a manually written excerpt (which can contain HTML). If that doesn’t exist, an excerpt is generated by stripping out the HTML tags so that the correct number of words can be counted. The chopped content could have malformed HTML if it wasn’t stripped first.
    You can write a function to filter the excerpt and try to do things differently or you can write manual excerpts.

Viewing 1 replies (of 1 total)
  • The topic ‘Keep linebreaks in post excerpt’ is closed to new replies.