@php
    $paged = ( get_query_var( 'paged' ) ) ? get_query_var( 'paged' ) : 1;
    global $wp_query;
    $pages = $wp_query->max_num_pages;
@endphp
<div data-infinite-loader
    class="infinite-loader @if($pages <= 1) disabled @endif"
    data-pages="{!! $pages !!}"
    data-page="{!! $paged !!}">
    <img src="@asset('images/loading.gif')" alt="Loading" class="loading">
    {!! __('Load more', 'thor') !!}
</div>