-
Notifications
You must be signed in to change notification settings - Fork 1
/
search.php
38 lines (30 loc) · 1.61 KB
/
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
34
35
36
37
38
<?php
get_header();
$ftd_img = get_field( 'search_bg', 'options' );
$img_med = wp_get_attachment_image_src($ftd_img, 'medium');
$img_large = wp_get_attachment_image_src($ftd_img, 'large');
$img_larger = wp_get_attachment_image_src($ftd_img, 'larger');
$img_largest = wp_get_attachment_image_src($ftd_img, 'largest');
$img_huge = wp_get_attachment_image_src($ftd_img, 'huge'); ?>
<div class="search_box">
<?php echo '<style>
.search_box {background-image: url(' . $img_med[0] . ');}';
if($img_large) { echo ' @media (min-width: 600px) { .search_box {background-image: url(' . $img_large[0] . ');} }'; }
if($img_larger) { echo ' @media (min-width: 1024px) { .search_box {background-image: url(' . $img_larger[0] . ');} }'; }
if($img_largest) { echo ' @media (min-width: 1400px) { .search_box {background-image: url(' . $img_largest[0] . ');} }'; }
if($img_huge) { echo ' @media (min-width: 1800px) { .search_box {background-image: url(' . $img_huge[0] . ');} }'; }
echo '</style>'; ?>
<div class="mask"></div>
<div class="content">
<h2><?php /* if(is_search()){ echo 'Mostrando resultados para: "<span class="">'.get_search_query().'</span>"'; } else { the_title(); } */ ?></h2>
<form role="search" method="get" id="searchform" class="searchform" action="<?php bloginfo('url') ?>">
<label>Mostrando resultados para: </label>
<input type="text" value="<?php the_search_query(); ?>" name="s" id="s"><br>
<input type="submit" id="searchsubmit" value="Volver a Buscar">
</form>
</div>
</div>
<section id="events-post">
<?php echo get_template_part('inc/loop'); ?>
</section>
<?php get_footer(); ?>