<?php
// switch_to_blog(1);
?>
<div id="search-module" class="search-module" mobile-closed aria-hidden role="search">
	<div class="search-module__wrapper-container">
		<?php get_search_form(); ?>
		<div class="search-module__suggestions">
			<?php echo __("Suggestions :", "homegrade-theme__texte-fonctionnel") ?>
			<?php
			$args = array(
				'post_type' => 'conseils',
				'posts_per_page' => 3,
				'orderby' => 'rand',

			);
			$suggestions_posts = new WP_Query($args);
			?>
			<ul class="search-module__suggestions__navlist">
				<?php foreach ($suggestions_posts->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>

<?php
// restore_current_blog();
?>
