Black Friday Sale! Get up to $30 off GP Premium! Learn more ➝

Reply To: Disable Masonry Load more

Home Forums Support Disable Masonry Load more Reply To: Disable Masonry Load more

Home Forums Support Disable Masonry Load more Reply To: Disable Masonry Load more

#97684
Tom
Lead Developer
Lead Developer

To enable masonry only on the homepage:

1. Disable Masonry in the Customizer.
2. Add this code:

add_filter('generate_blog_masonry','generate_blog_enable_blog_masonry_homepage');
function generate_blog_enable_blog_masonry_homepage()
{
        // If we're on the posts page, enable masonry
	if ( is_home() )
		return 'true';
	
        // Otherwise, disable it
	return 'false';
}

That should do it.

Let me know 🙂