Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add init infinite scroll
// Add init infinite scroll
add_action( 'wp_footer', 'custom_infinite_scroll_js',100);
function custom_infinite_scroll_js() {
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",
"behavior": "masonry"
jQuery( infinite_scroll.contentSelector ).infinitescroll( infinite_scroll );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment