Skip to content

Instantly share code, notes, and snippets.

@nacin
Last active Dec 23, 2015
Embed
What would you like to do?
<?php
/**
* Here's a template tag that always forces <!--more--> to be obeyed.
* Unfortunately this is suck a hack, I'm declining to publish it myself.
* This could make a good bug report for core, though. I would suggest a
* title of "Can't retrieve calculated excerpt bound by <!--more--> on single page view".
* I'd be happy to see what we can do to fix this.
*/
function always_the_excerpt() {
global $more;
$old_more = isset( $more ) ? $more : null;
$more = 0;
the_excerpt();
$more = $old_more;
}
@chriscoyier
Copy link

chriscoyier commented Sep 18, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment