29 lines
722 B
PHP
29 lines
722 B
PHP
<?php
|
|
|
|
?>
|
|
|
|
<div class="search-module search-module-closed" aria-hidden="true">
|
|
<div class="search-module__wrapper-container">
|
|
<?php get_search_form(); ?>
|
|
<div class="search-module__suggestions">
|
|
<h6>Suggestions :</h6>
|
|
<?php
|
|
$args = array(
|
|
'post_type' => 'conseils',
|
|
'posts_per_page' => 3,
|
|
'orderby' => 'rand',
|
|
|
|
);
|
|
$suggestions_posts = get_posts($args);
|
|
?>
|
|
<ul class="search-module__suggestions__navlist">
|
|
<?php foreach ($suggestions_posts as $post) : ?>
|
|
<li class="suggestion-item">
|
|
<a href="<?php echo get_the_permalink($post->ID) ?>"><?php echo $post->post_title ?></a>
|
|
</li>
|
|
<?php endforeach; ?>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|