Last active
February 16, 2019 12:58
-
-
Save adamlaki/180bb53e8720ef7ddf4f3f8d667ea082 to your computer and use it in GitHub Desktop.
Change Jetpack's Infinite Scroll Button's Text
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 cone_change_infinite_scroll_btn_text() { | |
if ( is_home() || is_archive() ) { ?> | |
<script type="text/javascript"> | |
var textCaption = ''; | |
if ( 'en-US' == $( 'html' ).attr( 'lang' ) ) { | |
textCaption = 'Load More Posts'; | |
} else { | |
textCaption = 'További bejegyzések' | |
} | |
infiniteScroll.settings.text = textCaption; | |
</script> | |
<?php } | |
} | |
add_action( 'wp_footer', 'cone_change_infinite_scroll_btn_text', 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment