Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Angelic Sanoy
Angelic Sanoy
Full Stack JavaScript Techdegree Student 6,580 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