Answer the question
In order to leave comments, you need to log in
Loaded previews in the masonry grid are not assigned block positions?
Newly uploaded previews go anywhere
HERE
start scrolling
infinite scroll
documentation masonry documentation index.php
code:
<?php get_header(); ?>
<div id="content"><div class="popup-loader"></div>
<div id="content_masonry">
<?php if ( have_posts() ) { while ( have_posts() ) { the_post(); ?>
<?php get_template_part('loop'); ?>
<?php } ?>
<?php } ?>
<div id="page-nav"><?php next_posts_link() ?></div>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
var $boxes = $('.loop');
var $container = $('#content_masonry');
$container.imagesLoaded( function() {
$boxes.fadeIn();
$( ".popup-loader" ).hide();
$container.masonry({
itemSelector : '.loop',
columnwidth: 300,
gutter: 23,
isFitWidth: true,
isAnimated: !Modernizr.csstransforms
});
});
var msnry = $container.data('masonry');
$container.infiniteScroll({
path: '#page-nav a',
append: '.loop',
outlayer: msnry,
history: false
});
Answer the question
In order to leave comments, you need to log in
$(function () {
var $boxes = $('.loop');
var $container = $('#content_masonry');
$container.imagesLoaded( function() {
$boxes.fadeIn();
$( ".popup-loader" ).hide();
$container.masonry({
itemSelector : '.loop',
columnwidth: 300,
gutter: 23,
isFitWidth: true,
isAnimated: !Modernizr.csstransforms
});
});
var msnry = $container.data('masonry');
$container.infiniteScroll({
path: '#page-nav a',
append: '.loop',
outlayer: msnry,
history: false
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question