Styles footer & titles
This commit is contained in:
@@ -44,7 +44,7 @@ class StarterSite extends Site {
|
||||
}
|
||||
});
|
||||
|
||||
/** POST "QUÉ ES LA CNT" */
|
||||
/** ***************** ACERCA DE - POST "QUÉ ES LA CNT" */
|
||||
// Previene borrar el post "Qué es la cnt" porque forma parte del menú //
|
||||
$ids_especiales = [10982, 4791, 10981];
|
||||
define('POST_ESPECIAL_TYPE', 'acerca');
|
||||
@@ -84,9 +84,30 @@ class StarterSite extends Site {
|
||||
}
|
||||
return $post_states;
|
||||
}, 10, 2);
|
||||
|
||||
/** FIN *************POST "QUÉ ES LA CNT" */
|
||||
|
||||
// ***************TEMP: Debug archivo vídeos
|
||||
// add_action('template_redirect', function() {
|
||||
// global $wp_query;
|
||||
// error_log('🔍 Template: ' . get_query_var('post_type'));
|
||||
// error_log('🔍 Is post type archive: ' . (is_post_type_archive() ? 'YES' : 'NO'));
|
||||
// error_log('🔍 Post type archive: ' . (is_post_type_archive('videos') ? 'VIDEOS' : 'NO'));
|
||||
|
||||
// });
|
||||
|
||||
// add_action('init', function() {
|
||||
// add_rewrite_rule(
|
||||
// '(eu|es)/videos/?$',
|
||||
// 'index.php?lang=$matches[1]&post_type=videos',
|
||||
// 'top'
|
||||
// );
|
||||
// add_rewrite_rule(
|
||||
// '(eu|es)/videos/page/([0-9]{1,})/?$',
|
||||
// 'index.php?lang=$matches[1]&post_type=videos&paged=$matches[2]',
|
||||
// 'top'
|
||||
// );
|
||||
// });
|
||||
// ******************************************
|
||||
|
||||
parent::__construct();
|
||||
}
|
||||
@@ -370,18 +391,7 @@ class StarterSite extends Site {
|
||||
|
||||
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
|
||||
|
||||
if ($post && ( $post->ID === 84 || $post->ID === 331) ) {
|
||||
return [
|
||||
'posts' => Timber::get_posts([
|
||||
'post_type' => 'videos',
|
||||
'posts_per_page' => -1,
|
||||
'post_status' => 'publish',
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC'
|
||||
]),
|
||||
'pagination' => null
|
||||
];
|
||||
} elseif ($post && ( $post->ID === 9 || $post->ID === 392) ) {
|
||||
if ($post && ( $post->ID === 9 || $post->ID === 392) ) {
|
||||
global $wp_query;
|
||||
$temp_query = $wp_query;
|
||||
|
||||
@@ -695,7 +705,7 @@ class StarterSite extends Site {
|
||||
$context['footer_2'] = get_field('footer_text_2', 'option');
|
||||
|
||||
//Otras páginas
|
||||
$context['videos'] = $this->getVideos();
|
||||
//$context['videos'] = $this->getVideos();
|
||||
$context['paginas_acerca'] = $this->getPaginasAcerca();
|
||||
$context['documentos'] = $this->getDocumentos();
|
||||
$context['enlaces'] = $this->getEnlaces();
|
||||
@@ -783,6 +793,19 @@ class StarterSite extends Site {
|
||||
]);
|
||||
}
|
||||
|
||||
public function getVideosSlider() {
|
||||
return [
|
||||
'posts' => Timber::get_posts([
|
||||
'post_type' => 'videos',
|
||||
'posts_per_page' => -1,
|
||||
'post_status' => 'publish',
|
||||
'orderby' => 'date',
|
||||
'order' => 'DESC'
|
||||
]),
|
||||
'pagination' => null
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Funciones globales
|
||||
*/
|
||||
@@ -857,5 +880,7 @@ class StarterSite extends Site {
|
||||
$twig->addFunction(new \Twig\TwigFunction('generar_embed', [$this, 'generar_embed_universal']));
|
||||
return $twig;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user