Below is the code to customize Jetpack Infinite Scroll module ‘Older Posts’ text.
<?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); |