Masonry and Jetpack Infinite Scroll – overlap issue

I have now solved point (2), the overlapping posts problem; maybe this will help someone else. I changed wrapper to true in the mytheme_jetpack_setup function in my PHP (so that the new posts are wrapped in their own div) And I changed the jQuery to: $(‘#content’).masonry({ columnWidth: ‘.grid-sizer’, itemSelector: ‘article’, gutter: ‘.gutter-sizer’ }); var infiniteCount … Read more

Masonry imagesLoaded javascript error

Followed the same article and ran into the same issue; the author (Josh Pollock) posted a followup on his blog. Essentially from WP 3.9, Masonry is there for you to use so all you need in functions.php is: add_action( ‘wp_enqueue_scripts’, ‘slug_masonry’ ); function slug_masonry( ) { wp_enqueue_script(‘masonry’); // note this is not jQuery } and … Read more

How to stop PHP code running when in a child theme

You can’t actually “remove” PHP code from the parent theme. What you can do is undo things done there. The counterpart of wp_enqueue_script is wp_dequeue_script. If you put this in your functions.php it should remove the Masonry Plugin (untested) add_action( ‘wp_print_scripts’, ‘de_script’, 100 ); function de_script() { wp_dequeue_script( ‘jquery-masonry’ ); } Source: Function Reference/wp dequeue … Read more