• Resolved muydelpalo

    (@muydelpalo)


    Hi!

    I am working on a custom theme for a portfolio site that also as a blog. I have set the front page to only display the portfolio categories, and the posts page to display the rest of the categories, as explained here.

    I have been trying to get infinite scroll to work without any success. I have tried this method and also the Jetpack plugin, but none of them have worked, so I am wondering if it is just something that doesn’t work when you set your posts like I have.

    Any ideas? thank you!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Can you shed some light on how it was resolved?

    Thread Starter muydelpalo

    (@muydelpalo)

    Hi! first you need to make sure the footer is enabled. I added these two pieces to functions.php of code I found online and it works.

    Hope this helps!

    add_theme_support( 'infinite-scroll', array(
        'container'    => 'content',
    	'posts_per_page' => 21,
    ) );
    function tweakjp_custom_is_support() {
    	$supported = current_theme_supports( 'infinite-scroll' ) && ( is_home() || is_archive() || is_page() );
    
    	return $supported;
    }
    add_filter( 'infinite_scroll_archive_supported', 'tweakjp_custom_is_support' );
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Infinite scroll with static home page’ is closed to new replies.