---
title: How to Avoid Widow "Read More" Links in Post Excerpts
date: 2012-02-22T09:30:34+00:00
modified: 2012-02-25T13:00:38+00:00
image:: https://kaspars.net/wp-content/uploads/2012/02/read-more-widow-last-word-wordpress.jpg
permalink: https://kaspars.net/blog/avoid-widow-read-more-links
post_type: post
author:
  name: Kaspars
  avatar: https://reverse.kaspars.net/gravatar/avatar/92bfcd3a8c3a21a033a6484d32c25a40b113ec6891f674336081513d5c98ef76?s=96&d=mm&r=g
post_tag:
  - PHP
  - Snippet
category:
  - WordPress
---

# How to Avoid Widow “Read More” Links in Post Excerpts

[![Read more link widow in WordPress excerpts](https://kaspars.net/wp-content/uploads/2012/02/read-more-widow-last-word-wordpress.jpg?strip=all&quality=90&resize=500,150 "Read more link widow in WordPress excerpts")](https://kaspars.net/wp-content/uploads/2012/02/read-more-widow-last-word-wordpress.jpg)

A “widow” in typography is defined as:

> A paragraph-ending line that falls at the beginning of the following page/column, thus separated from the rest of the text.

If you are using the standard inline “Read more” links at the end of post excerpts on index and archive pages, here is a simple filter to ensure that a non-breaking space is added before the “Read more” link:

```
add_filter('the_content_more_link', 'prepend_non_breaking');
function prepend_non_breaking($more_link) {
	return str_replace(' <a ', '&nbsp;<a ', $more_link);
}
```