Change normal grids to masonry grids

This is not really a WordPress issue, you will have to play around with the CSS to get the layout you desire, if you take a look at isotope.js library you will see that hey have documentation on how to display Masonry grid https://isotope.metafizzy.co/layout-modes/masonry.html , and if that doesn’t fit your needs you can learn … Read more

posts_per_page not working in block

The problem was that there were ‘pinned’ posts, which were overriding everything. Un-pinning these posts seemed to do the trick. Also, thanks to Sally CJ for the nopaging tip – I wasn’t aware that it causes posts_per_page to be ignored also.

WP_Query() not filtering posts for category

the_post() operates on the main query, but this isn’t the main query you’re looping over, you need to use $q->the_post() Remember: the_post() is the same as global $wp_query; $wp_query->the_post(); All post loops are WP_Query post loops if you dig down deep enough, even get_posts has a WP_Query inside it There can only be 1 current … Read more