FIX paginación videos
This commit is contained in:
@ -5,19 +5,7 @@
|
|||||||
|
|
||||||
$context = Timber::context();
|
$context = Timber::context();
|
||||||
|
|
||||||
// Debug
|
$context['videos'] = Timber::get_posts();
|
||||||
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
|
|
||||||
]);
|
|
||||||
|
|
||||||
error_log('✅ archive-videos - Posts: ' . count($context['videos']));
|
error_log('✅ archive-videos - Posts: ' . count($context['videos']));
|
||||||
|
|
||||||
Timber::render('templates/page-videos.twig', $context);
|
Timber::render('templates/page-videos.twig', $context);
|
||||||
|
|||||||
Reference in New Issue
Block a user