Below is the code to customize Jetpack Infinite Scroll module ‘Older Posts’ text.
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 | |
//* Customize Jetpack Infinite Scroll module 'Older Posts' text | |
function prefix_jetpack_infinite_scroll_custom_text() { | |
if (is_home() || is_archive()) { | |
?> | |
<script type="text/javascript"> | |
//<![CDATA[ | |
infiniteScroll.settings.text = "Custom Text"; | |
//]]> | |
</script> | |
<?php | |
} | |
} | |
add_action('wp_footer', 'prefix_jetpack_infinite_scroll_custom_text', 3); |