-
Notifications
You must be signed in to change notification settings - Fork 0
/
search.php
33 lines (20 loc) · 825 Bytes
/
search.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* The template for displaying search results pages
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#search-result
*
*/
get_header(); ?>
<h1><?php printf( esc_html__( 'Hakutulokset: %s' ), '<span>' . get_search_query() . '</span>' ); ?></h1>
<?php if ( have_posts() ) : ?>
<?php global $wp_query; ?>
<p><?php echo esc_html( 'Haulla löytyi ' ) . sprintf( esc_html( _n( '%s tulos.', '%s tulosta.', $wp_query->found_posts ) ), esc_html( $wp_query->found_posts ) ); ?></p>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'template-parts/content', get_post_type() ); ?>
<?php endwhile; ?>
<?php flo_starter_the_pagination(); ?>
<?php else : ?>
<?php get_template_part( 'template-parts/content', 'none' ); ?>
<?php endif; ?>
<?php get_footer();