The only thing that makes sense to me is that $text
immediately after this line:
$text = force_balance_tags($out);
Has something that wpautop
translates as a paragraph break– something like a double newline.
Untested, but I would think that trim
would clear it up.
$text = trim($text) . $excerpt_end;
Related Posts:
- Remove more or […] text from short post
- apply_filters() and the_excerpt are giving unexpected results
- How can I create a “Read More” link using the_excerpt() on a static front page?
- Compare the_excerpt() to the_content()
- Display Links in Excerpts?
- Remove Ellipses from Excerpt
- Read more tag shows up on EVERY post
- Issue with enabling formatting in excerpts in WordPress
- limit the words in the post content and add read more link
- Custom excerpt length on home page
- Excerpt Word Count
- How to show only manual / custom excerpts?
- Modify Twenty Fourteen Home Page Content Limit & Add Read More Link
- “Read more” link doesn’t show up when the post length is under the excerpt length
- How do I disable excerpts on blogs and website
- Regenerate auto excerpts after updating many posts
- can hyperlinks be displayed in excerpts?
- Making oEmbed work on the excerpt field
- Remove whitespace before the_excerpt();
- How to get excerpt correctly formatted
- How to display only the excerpt in the blog/posts page with Gutenberg?
- Read more on the post page itself
- Bulk add tag (or any sort of label) to posts who have custom excerpt
- How to correctly limit the content and strip HTML?
- Writing a custom excerpt function
- the_excerpt – want to modify password protected output
- Auto Populate Excerpt Field
- Any way to get more space for editing post excerpts
- Remove Text within Header tags in the Excerpt
- Where is the logic that defines the excerpt?
- Line in excerpt and max 5 lines
- Show the excerpt in a loop
- Custom Excerpts Per Page
- Excerpts automatically remove paragraph space
- How to apply excerpt length only on front end?
- get_the_excerpt() issues – returns the excerpt twice or not at all?
- Bug in the_excerpt() function
- Excerpt content
- Show excerpts of posts on P2 Home page
- get_the_excerpt without images
- How to get only manual excerpts?
- How to get excerpt of the recent posts
- excerpt display same text
- Problem with viewing single page correctly. (taken half way down the page on click through)
- Limit the size of the post excerpt
- excerpt box not visible
- I can’t modify the ‘Continue reading…’ link of the_excerpt
- get video from content
- Show Excerpts In Twenty Eleven Theme
- How do you edit the html of teaser excerpts
- Show image in excerpt post. Image not displaying
- the_excerpt() and tag
- the_excerpt is not limiting my post page to 55 words?
- I want to show post excerpt and cap it at 20 words [duplicate]
- Split the_content into two parts
- Use get_the_excerpt is returning nothing outside of loop
- How to edit a typo in excerpt?
- Creating excerpt with simple “Read more” link
- How to remove excerpt white spaces
- The Excerpt gets page excerpt instead of most recent post excerpt
- making the […] clickable
- Why archive page can’t show full content?
- truncate post with gallery tag
- Modify excerpt link
- Reblog WordPress to another WordPress?
- What’s the internal concatenation function for creating Excerpts with WordPress?
- Append Second Link to Read More
- Twenty Eleven: Home Page, View full post of most recent post & Summary of the rest
- “Continue reading” not on some posts, full excerpts not shown
- Get the automatic excerpt from a page created with gutenberg
- Read More excerpt link on a post is not linking to the post itself
- Relia Theme Homepage Articles Excerpt displays the current page excerpt not the posts being pulled
- the_excerpt() is not trimming at
- Remove Default Read More Link in Manual Excerpt RSS Feed
- Excerpts not showing
- “read more” tag for excerpt() won’t show full content
- Keep excerpt from stripping URLs and enable autoembed for youtube ONLY?
- Unable to show excerpts
- excerpt button not going to custom post page
- NextGen Gallery not allowing me to display the_excerpt();?
- Excerpt functions is removing the forward slash on the url
- Excerpt preview
- the_excerpt() doesn’t return the Excerpt field content
- Manual excerpt being ignored on custom post type
- Remove “[ ]” from excerpt in highlight search term
- Excerpt filter is adding ” in incorrect place
- 2 posts same excerpt?
- Edit the excerpt before it is shown
- Is there a html tag filter for the excerpt?
- How to display page excerpt with readmore link inside an enhanced widget?
- Excerpt is only getting shown for first post
- Implementing a blog excerpt in custom theme
- Post content not showing
- Excerpt length and alignment [duplicate]
- Export Posts in excel [closed]
- Remove automatic excerpts only for single posts
- Setting post excerpt length in php wordpress code, Should will help to save DB size?
- Remove the excerpt and “… Read More” from the featured content on the home page with child theme
- Format main page post excerpt previews
- HTML in excerpt WordPress 6.2.2