Auto generated descriptions (%%excerpt%%) cut out the last word
- [x] I've read and understood the contribution guidelines.
- [x] I've searched for any related issues and avoided creating a duplicate issue.
Please give us a description of what happened.
Some of my posts don't have a meta description, some have an excerpt, some just have a paragraph or two of text and no excerpt or meta description (it's a mess!) so I use the "%%excerpt%%" tag to generate an automatic description:
This usually works well, but on posts with little text (sometimes) the generated description doesn't include the last word. For example, if I have the following text:
This is a quick post to show the short description issue with Yoast SEO.
The word "SEO." is not included in the description tag:
This is a quick post to show the short description issue with Yoast
Please describe what you expected to happen and why.
Ideally auto generated descriptions should use the full sentence (unless it's over the 320 character limit).
How can we reproduce this behavior?
- Install Yoast SEO
- Create a post (without an excerpt or meta description) with a short text (eg: use the same I used above)
- Add the "%%excerpt%%" tag on Search Appearance > Content Types > Post
- Check the source code
Technical info
- WordPress version: 4.9.5
- Yoast SEO version: 7.3
- Relevant plugins in case of a bug: This happens even when Yoast SEO is the only active plugin.
- Tested with theme: Twenty Seventeen (seems to happen with all themes)
- Server: Tested on a LEMP and LAMP stack
Thanks for reporting this bug! I’ve marked it as backlog so it appears on the to-do list for our developers.
This has been fixed in https://github.com/Yoast/wordpress-seo/pull/11187