FIX search
This commit is contained in:
@@ -85,6 +85,20 @@ class StarterSite extends Site {
|
|||||||
}, 10, 2);
|
}, 10, 2);
|
||||||
/** FIN *************POST "QUÉ ES LA CNT" */
|
/** 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();
|
parent::__construct();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -716,7 +730,7 @@ class StarterSite extends Site {
|
|||||||
public function getVideosSlider() {
|
public function getVideosSlider() {
|
||||||
|
|
||||||
$post = Timber::get_post();
|
$post = Timber::get_post();
|
||||||
error_log('✅ getVideosSlider - ID Página: ' . $post->ID);
|
//error_log('✅ getVideosSlider - ID Página: ' . $post->ID);
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'posts' => Timber::get_posts([
|
'posts' => Timber::get_posts([
|
||||||
@@ -806,6 +820,4 @@ class StarterSite extends Site {
|
|||||||
return $twig;
|
return $twig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
<i class="bi bi-search"></i>
|
<i class="bi bi-search"></i>
|
||||||
</button>
|
</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">
|
<div class="offcanvas-header">
|
||||||
<h5 class="offcanvas-title" id="offcanvasTopLabel">Búsqueda</h5>
|
<h5 class="offcanvas-title" id="offcanvasTopLabel">Búsqueda</h5>
|
||||||
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
<button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close"></button>
|
||||||
|
|||||||
@@ -3,21 +3,18 @@
|
|||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
<section class="search-canvas ">
|
<section class="search-canvas ">
|
||||||
<p class="mb-5 position-relative fs-4 fw-bold sp-module-title">{{ post.title }}</p>
|
<p class="my-5 position-relative fs-5 fw-bold sp-module-title">{{ __('Resultados de búsqueda para', 'Sindikatua')}}: "{{ search_query }}"</p>
|
||||||
|
|
||||||
<p class="pt-4">{{ __('Resultados de búsqueda para', 'Sindikatua')}}: "{{ search_query }}"</p>
|
|
||||||
<div class="content-wrapper">
|
<div class="content-wrapper">
|
||||||
{% for post in posts %}
|
{% for post in posts %}
|
||||||
{% include ['partials/tease-' ~ post.type ~ '.twig', 'partials/tease.twig'] %}
|
{% include ['partials/tease-' ~ post.type ~ '.twig', 'partials/tease.twig'] %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
{% include 'partials/pagination.twig' with {
|
{% set pagination = posts.pagination %}
|
||||||
pagination: posts.pagination({
|
<div class="pagination-custom mt-5">
|
||||||
show_all: false,
|
{% include 'partials/pagination-custom.twig' %}
|
||||||
mid_size: 3,
|
</div>
|
||||||
end_size: 2
|
|
||||||
})
|
|
||||||
} %}
|
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user