Last active
August 29, 2015 14:18
-
-
Save frankschrijvers/4bbcf750a2d67b7c43c6 to your computer and use it in GitHub Desktop.
Add init infinite scroll
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
// Add init infinite scroll | |
add_action( 'wp_footer', 'custom_infinite_scroll_js',100); | |
function custom_infinite_scroll_js() { | |
?> | |
<script> | |
var infinite_scroll = { | |
loading: { | |
msgText: "<?php _e( 'Loading the next set of posts...', 'plastic' ); ?>", | |
finishedMsg: "<?php _e( 'All posts loaded.', 'plastic' ); ?>" | |
}, | |
"nextSelector":".pagination-next a", | |
"navSelector":".pagination", | |
"itemSelector":".brick", | |
"contentSelector":"#container", | |
"behavior": "masonry" | |
}; | |
jQuery( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll ); | |
</script> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment