FIX search

This commit is contained in:
2025-10-20 07:36:24 +00:00
parent 2c4d0b8308
commit 726b61cde8
3 changed files with 23 additions and 14 deletions

View File

@ -85,6 +85,20 @@ class StarterSite extends Site {
}, 10, 2);
/** FIN *************POST "QUÉ ES LA CNT" */
// *** SOLO USAR UNA VEZ PARA LIMPIAR. NO FUNCIONABA LA PAGINACIÓN DE SEARCH.
// add_action('init', function() {
// add_rewrite_rule(
// 'page/([0-9]+)/?$',
// 'index.php?paged=$matches[1]',
// 'top'
// );
// // Solo ejecuta una vez, luego comenta estas líneas
// error_log('✅ flush rewrite rules');
// flush_rewrite_rules(false);
// }, 10);
parent::__construct();
}
@ -716,7 +730,7 @@ class StarterSite extends Site {
public function getVideosSlider() {
$post = Timber::get_post();
error_log('✅ getVideosSlider - ID Página: ' . $post->ID);
//error_log('✅ getVideosSlider - ID Página: ' . $post->ID);
return [
'posts' => Timber::get_posts([
@ -806,6 +820,4 @@ class StarterSite extends Site {
return $twig;
}
}

View File

@ -3,7 +3,7 @@
<i class="bi bi-search"></i>
</button>
<div class="offcanvas offcanvas-top mt-3" tabindex="-1" id="offcanvasTop" aria-labelledby="offcanvasTopLabel" style="max-height: 18vh;">
<div class="offcanvas offcanvas-top" tabindex="-1" id="offcanvasTop" aria-labelledby="offcanvasTopLabel" style="max-height: 18vh;">
<div class="offcanvas-header">
<h5 class="offcanvas-title" id="offcanvasTopLabel">Búsqueda</h5>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>

View File

@ -3,21 +3,18 @@
{% block content %}
<section class="search-canvas ">
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</p>
<p class="pt-4">{{ __('Resultados de búsqueda para', 'Sindikatua')}}: "{{ search_query }}"</p>
<p class="my-5 position-relative fs-5 fw-bold sp-module-title">{{ __('Resultados de búsqueda para', 'Sindikatua')}}: "{{ search_query }}"</p>
<div class="content-wrapper">
{% for post in posts %}
{% include ['partials/tease-' ~ post.type ~ '.twig', 'partials/tease.twig'] %}
{% endfor %}
{% include 'partials/pagination.twig' with {
pagination: posts.pagination({
show_all: false,
mid_size: 3,
end_size: 2
})
} %}
{% set pagination = posts.pagination %}
<div class="pagination-custom mt-5">
{% include 'partials/pagination-custom.twig' %}
</div>
</div>
</section>