FIX paginación videos

This commit is contained in:
2025-10-21 13:29:47 +00:00
parent 4c614e3710
commit e4a0634bc6

View File

@ -5,19 +5,7 @@
$context = Timber::context();
// Debug
global $wp_query;
// error_log('🔍 Language: ' . (function_exists('pll_current_language') ? pll_current_language() : 'no polylang'));
// error_log('🔍 Post type: ' . get_query_var('post_type'));
// error_log('🔍 Posts found by WP: ' . $wp_query->found_posts);
// WordPress ya tiene la paginación correcta en la query
$context['videos'] = Timber::get_posts([
'post_type' => 'videos',
'posts_per_page' => -1,
'lang' => '' // Importante: vacío para obtener todos
]);
$context['videos'] = Timber::get_posts();
error_log('✅ archive-videos - Posts: ' . count($context['videos']));
Timber::render('templates/page-videos.twig', $context);