This is a work-in-progress cheatsheet for JS arrays. Please feel free to leave a comment if this has helped you or you would like to suggest anything.
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 if( is_home() || is_front_page() ) : ?> | |
<!-- Homepage Only Code --> | |
<?php else : ?> | |
<!-- Other Page Code --> | |
<?php endif; ?> |
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
function jk_masonry() { | |
wp_enqueue_script( 'jquery-masonry', array( 'jquery' ) ); | |
} | |
add_action( 'wp_enqueue_scripts', 'jk_masonry' ); | |
/* | |
How to use? | |
$('#container').masonry({ singleMode: true }); |
NewerOlder