0

I'm using Masonry on a Wordpress site, to display posts from a custom post type (training_videos).

As all the columns are the same width im using the singleMode = true option. The site is a responsive site using Skeleton, hence why they need to be the same width for uniform display purposes.

I can get the pots to display fine, and the Masonry aspect is all good, but...

...As the training_videos post type has "more than a few" posts in it, I want to be able to only display 6 at a time, with an append button that adds 6 more underneath and so on, until there are no more to add.

This is where I get stuck.

I can't work out how to get it to work!

Here is the JS Masonry call I'm using so far:

<script>
jQuery(document).ready(function($) {
    $('#masonry').masonry({singleMode: true});
});
</script>

'#masonry' being the container the posts sit in

After following the actualy masonry tutorial site, I'm completely stumped!

Thanks

1

It sounds like you need to use the pagination and posts_per_page arguments for your query. More info: http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters

And using another solution to load more posts when the button is clicked. Maybe this will help you in the right direction.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.