Angelic Sanoy
Angelic Sanoy
3,326 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