add actual version

This commit is contained in:
masterforweb
2026-01-12 13:37:40 +03:00
parent 2a322664b5
commit 2aff9ab6b1
14 changed files with 267 additions and 73 deletions

View File

@@ -13,7 +13,14 @@
<?php else : ?>
<?php get_template_part( "template-parts/archive/grid" ) ?>
<?php get_template_part( "template-parts/archive/ajax-load-more" ) ?>
<?php
// Выводим ajax-load-more только если элементов 20 или больше
global $wp_query;
if ( $wp_query->found_posts >= 20 ) :
?>
<?php get_template_part( "template-parts/archive/ajax-load-more" ) ?>
<?php endif; ?>
<?php endif; ?>