Created
May 24, 2018 01:59
-
-
Save jasonyingling/ad2832bc1768d1fbb63341aef072908b to your computer and use it in GitHub Desktop.
Remove Reading Time from all but single posts in Reading Time WP
This file contains hidden or 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 | |
function reading_time_remove_front_page() { | |
if ( ! is_singular() ) { | |
global $readingTimeWP; | |
remove_filter('the_content', array($readingTimeWP, 'rt_add_reading_time_before_content')); | |
} | |
} | |
add_action( 'wp', 'reading_time_remove_front_page' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment