Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.


Angelic Sanoy
Angelic Sanoy
3,678 Points

Inifinite Scroll Ajax

Do you have any clue what's wrong with my ajax inifnite scrolling why it doesn't load all the 103 entries? Basically, my custom post types should have 103 entries but the max page I am only seeing is 30. Also, the pagination redirects me to a 404 pages. When I inspect the elements I seen an error called jquery.js:4 GET https://hbincstage.wpengine.com/press/page/2/ 404 but my biggest issue is the infinite scroll button. I can disable the pagination as long as the load more works. Thank you so much guys!

Here's the staging: https://hbincstage.wpengine.com/press/

I added this code on my template.

/ If infinite scroll with "load more" button is used
    if ( Avada()->settings->get( 'grid_pagination_type' ) == 'load_more_button' ) {
        echo sprintf( '<div class="fusion-load-more-button fusion-clearfix">%s</div>', apply_filters( 'avada_load_more_pots_name', __( 'Load More Press', 'Avada' ) ) );

    // Render the pagination
fusion_pagination( $portfolio_posts_to_display->max_num_pages, $range = 2, $portfolio_posts_to_display );


} // password check