-
-
Save nacin/ab97d4b0e57b169d26d5 to your computer and use it in GitHub Desktop.
For @chriscoyier.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://core.trac.wordpress.org/ticket/25349 cheers