Compare commits
3 Commits
a22c049b6d
...
1dab08b556
| Author | SHA1 | Date | |
|---|---|---|---|
| 1dab08b556 | |||
| f21df9844a | |||
| 8b6454e10b |
|
|
@ -57,8 +57,6 @@ function build_search_artisan_posts_cards($request)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
$args = array(
|
$args = array(
|
||||||
"status" => "publish",
|
"status" => "publish",
|
||||||
"post_type" => "artisans",
|
"post_type" => "artisans",
|
||||||
|
|
@ -97,10 +95,6 @@ function build_search_artisan_posts_cards($request)
|
||||||
$html_template = ob_get_clean();
|
$html_template = ob_get_clean();
|
||||||
|
|
||||||
ob_start();
|
ob_start();
|
||||||
|
|
||||||
|
|
||||||
echo __("test pour gilles", "metiers-patrimoine-theme");
|
|
||||||
|
|
||||||
get_template_part(
|
get_template_part(
|
||||||
'template-components/artisans/artisan-search-no-results',
|
'template-components/artisans/artisan-search-no-results',
|
||||||
null,
|
null,
|
||||||
|
|
@ -140,14 +134,8 @@ function debugQueryTest()
|
||||||
$newsPostsDatas = new WP_Query($args);
|
$newsPostsDatas = new WP_Query($args);
|
||||||
$filteredPosts = [];
|
$filteredPosts = [];
|
||||||
|
|
||||||
foreach ($newsPostsDatas as $post => $value) {
|
|
||||||
// $persons = get_field('company_members', $value->ID);
|
|
||||||
// write_log($persons);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// write_log($newsPostsDatas->posts);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
do_action('wpml_switch_language', 'nl');
|
do_action('wpml_switch_language', 'nl');
|
||||||
|
|
@ -164,32 +152,4 @@ function debugQueryTest()
|
||||||
}
|
}
|
||||||
// debugQueryTest();
|
// debugQueryTest();
|
||||||
|
|
||||||
add_action('wp_footer', 'debugQueryTest');
|
// add_action('wp_footer', 'debugQueryTest');
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
add_action('rest_api_init', function () {
|
|
||||||
register_rest_route('metiers-patrimoine-datas/v1/build', '/test', array(
|
|
||||||
'methods' => 'GET',
|
|
||||||
'callback' => 'handle_rest_callback_metiers',
|
|
||||||
));
|
|
||||||
});
|
|
||||||
|
|
||||||
function handle_rest_callback_metiers()
|
|
||||||
{
|
|
||||||
do_action('wpml_switch_language', 'nl');
|
|
||||||
|
|
||||||
ob_start();
|
|
||||||
get_template_part(
|
|
||||||
'template-components/artisans/artisan-search-no-results',
|
|
||||||
null,
|
|
||||||
[]
|
|
||||||
);
|
|
||||||
$html_template = ob_get_clean();
|
|
||||||
|
|
||||||
return array(
|
|
||||||
'html_template' => $html_template,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
// $lang = apply_filters('wpml_current_language', null);
|
|
||||||
// write_log($lang);
|
|
||||||
?>
|
?>
|
||||||
<h1><?php echo __("test pour gilles", "metiers-patrimoine-theme") ?></h1>
|
|
||||||
<div class='no-results'><img class='no-results__cover' src=" <?php get_stylesheet_directory_uri() . "/resources/img/illustrations/Homegrade_resultats-filtres-cactus.svg" ?>" alt='' />
|
<div class='no-results'><img class='no-results__cover' src=" <?php get_stylesheet_directory_uri() . "/resources/img/illustrations/Homegrade_resultats-filtres-cactus.svg" ?>" alt='' />
|
||||||
<h3><?php echo __("Aucun résultat trouvé", "metiers-patrimoine-theme") ?> </h3>
|
<h3><?php echo __("Aucun résultat trouvé", "metiers-patrimoine-theme") ?> </h3>
|
||||||
<p> <?php echo __("Essayez d'ajouter un <span class='highlighted-purple'>filtre supplémentaire</span> pour trouver plus de résultats", "metiers-patrimoine-theme") ?></p>
|
<p> <?php echo __("Essayez d'ajouter un <span class='highlighted-purple'>filtre supplémentaire</span> pour trouver plus de résultats", "metiers-patrimoine-theme") ?></p>
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,6 @@ $initialPosts = new WP_Query([
|
||||||
"posts_per_page" => -1,
|
"posts_per_page" => -1,
|
||||||
"paged" => 1,
|
"paged" => 1,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="homegrade-page-container metiers-patrimoine-page-container--repertoire-metiers">
|
<div class="homegrade-page-container metiers-patrimoine-page-container--repertoire-metiers">
|
||||||
|
|
@ -50,7 +49,6 @@ $initialPosts = new WP_Query([
|
||||||
));
|
));
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
<section class="artisans-posts">
|
<section class="artisans-posts">
|
||||||
<aside class="metier-patrimoine-searchbar">
|
<aside class="metier-patrimoine-searchbar">
|
||||||
<div class="metier-patrimoine-searchbar__results-indications">
|
<div class="metier-patrimoine-searchbar__results-indications">
|
||||||
|
|
@ -141,7 +139,6 @@ $initialPosts = new WP_Query([
|
||||||
<input class="parent-checkbox taxonomy-checkbox" type="checkbox" name="metiers[]" value="<?php echo esc_attr($parent_term->term_id); ?>" data-term="<?php echo esc_attr($parent_term->slug); ?>">
|
<input class="parent-checkbox taxonomy-checkbox" type="checkbox" name="metiers[]" value="<?php echo esc_attr($parent_term->term_id); ?>" data-term="<?php echo esc_attr($parent_term->slug); ?>">
|
||||||
<label>
|
<label>
|
||||||
<?php echo esc_html($parent_term->name); ?>
|
<?php echo esc_html($parent_term->name); ?>
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<!-- Afficher les enfants sous forme de checkboxes -->
|
<!-- Afficher les enfants sous forme de checkboxes -->
|
||||||
|
|
@ -213,8 +210,6 @@ $initialPosts = new WP_Query([
|
||||||
|
|
||||||
<div class=" artisans-posts__grid">
|
<div class=" artisans-posts__grid">
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
|
||||||
foreach ($initialPosts->posts as $key => $artisanPost) {
|
foreach ($initialPosts->posts as $key => $artisanPost) {
|
||||||
$post_date = get_the_date('j.m.Y', $artisanPost->ID) ?? null;
|
$post_date = get_the_date('j.m.Y', $artisanPost->ID) ?? null;
|
||||||
|
|
||||||
|
|
@ -231,8 +226,6 @@ $initialPosts = new WP_Query([
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</section>
|
</section>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user