Can't retrieve calculated excerpt bound by <!--more--> on single page view
|Reported by:||chriscoyier||Owned by:|
|Component:||Posts, Post Types||Keywords:||has-patch needs-testing|
Submitting as Mr. Nacin suggested would be a good idea.
The issue in words I understand is: when you use the_excerpt() on (for instance) a custom page template, it ignores the <!-- more --> comment that you might have carefully placed in your content. I would expect it to honor this, since that is kind of the point of that special comment. the_content() will honor it when used on non-single-pages, but in the case of a custom page template, the_content() will of course spit out the entirely of the content.
Andrew gave me this code which does the trick: https://gist.github.com/nacin/ab97d4b0e57b169d26d5 but is apparently hacky and not for public consumption.
This is my lame visual of where I was running into the issue: http://glui.me/?i=5bcy8yr99pl7xel/2013-09-17_at_4.28_PM_2x.png/
Also apparently I'm not the only one who's had this come up recently: https://twitter.com/ShaneHudson/status/380105193419186176
Change History (8)
- Component changed from General to Template
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
- Component changed from Template to Posts, Post Types
- Focuses template added