-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsearch.php
More file actions
43 lines (29 loc) · 862 Bytes
/
Copy pathsearch.php
File metadata and controls
43 lines (29 loc) · 862 Bytes
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
34
35
36
37
38
39
40
41
42
43
<?php
/**
* The template for displaying the search page.
*
* (C) BYMARC
*
*/
?>
<?php get_header(); ?>
<!-- HTML content starts! -->
<?php get_template_part( 'template-parts/stage/stage-archive')?>
<?php get_template_part( 'template-parts/content/filter')?>
<?php
// the query
$wpb_all_query = new WP_Query(array('post_type' => 'recipes', 'post_status' => 'publish', 'posts_per_page' => -1)); ?>
<?php if ($wpb_all_query->have_posts()) : ?>
<ul>
<?php while (have_posts()) : ?>
<?php the_post(); ?>
<?php get_template_part( 'template-parts/content/recipe-loop')?>
<?php endwhile; ?>
</ul>
<?php wp_reset_postdata(); ?>
<?php else : ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
<!-- HTML content ends! -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>