@ -446,7 +446,7 @@ function maybe_truncate_string( $string, $length = 40 ) {
function get_catalog_page(): ?\WP_Post {
$catalog_pages = get_pages( [
'meta_key' => '_wp_page_template',
'meta_value' => 'page-catalog.php',
'meta_value' => 'page-catalog.php', //phpcs:ignore HM.Performance.SlowMetaQuery.slow_query_meta_value
]);
return $catalog_pages[0] ?? null;
}
@ -58,7 +58,7 @@ if ( $catalog_page ) {
<div class="slider" role="region" aria-labelledby="latest-books-title" data-total-pages="<?php echo $catalog_data['pages']; ?>"
<?php
if ( $next_page <= $catalog_data['pages'] ) :
?>
data-next-page="<?php echo $next_page; ?>"<?php endif; ?>>
<ul class="books">