Skip to content

Instantly share code, notes, and snippets.

@khikrama
Forked from raselahmed7/enable-masonry.php
Last active August 29, 2015 14:06
Show Gist options
  • Save khikrama/73639958003c592670c9 to your computer and use it in GitHub Desktop.
Save khikrama/73639958003c592670c9 to your computer and use it in GitHub Desktop.
add_action( 'wp_enqueue_scripts', 'jk_masonry' );
function jk_masonry() {
wp_enqueue_script( 'jquery-masonry', array( 'jquery' ) );
}
/*
How to use?
$('#container').masonry({ singleMode: true });
or
$('#container').masonry({ columnWidth: 200 });
Get masonry resources form here: http://masonry.desandro.com/
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment