-
-
Save jamiemitchell/18666c4761917b31d013 to your computer and use it in GitHub Desktop.
Masonry with Infine scroll page template
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 | |
/* | |
Template Name: Masonry Grid Scroll | |
*/ | |
/* | |
* @author Frank Schrijvers | |
* @link https://www.wpstud.io | |
*/ | |
// Enqueue scripts for masonry and infinite scroll | |
add_action('wp_enqueue_scripts', 'wpstudio_load_scripts_frontpage'); | |
function wpstudio_load_scripts_frontpage() { | |
wp_enqueue_script( 'infinite_scroll', get_stylesheet_directory_uri() . '/js/jquery.infinitescroll.min.js', array( ),null,true ); | |
wp_enqueue_script( 'mansonry-isotope', get_stylesheet_directory_uri() . '/js/masonry-isotope.min.js', array('infinite_scroll'),null, true ); | |
wp_enqueue_script( 'mansonry-init', get_stylesheet_directory_uri() . '/js/init-masonry.min.js', array('jquery'),null, true ); | |
wp_enqueue_script( 'jquery-masonry', array( 'jquery' ), true ); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment