get_the_excerpt returning blank string since WP 4.5 upgrade
-
Hello. My site was upgraded to WordPress 4.5 this morning.
My theme: Sandbox 1.6.2
URL: https://www.englishcurrent.comSince the upgrade, get_the_excerpt returns a blank string on my index.php
However, if I change code to call the_excerpt (not get_the_excerpt), then the proper excerpt will display. However, it begins with a line break that I don’t want. I think this was the reason I switched the code to get_the_excerpt.
— Relevant code in index.php:
<div class="entry-date"><strong><?php unset($previousday); printf( __( '%1$s – %2$s', 'sandbox' ), the_date( '', '', '', false ), '' ) ?></strong> <?php echo get_the_excerpt( __( 'Read More <span class="meta-nav">»</span>', 'sandbox' ) ) ?></div> <div style="padding-bottom:10px;"></div>
— Relevant code in functions.php (I’ve tried commenting it out to no avail)
remove_filter( 'the_content', 'wpautop' ); remove_filter( 'the_excerpt', 'wpautop' );
— I’ve tried logging out of WP admin, clearing my cache/cookies, different browsers, and disabling all plugins. It did not affect the behaviour.
Any help would be appreciated. Thanks.
PS: I am not a WordPress guru.
- The topic ‘get_the_excerpt returning blank string since WP 4.5 upgrade’ is closed to new replies.