-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsearch.php
27 lines (26 loc) · 820 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
<?php
get_header();
global $wp_query;
?>
<div class="container" id="search">
<h1><?php echo $wp_query->found_posts; ?> Resultados entontrados para : "<?php the_search_query(); ?>"</h1>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); $ID=get_the_ID();
$img=wp_get_attachment_image_src( get_post_thumbnail_id($ID), 'thumbnail' );
?>
<div class="media">
<div class="media-left">
<a href="<?php the_permalink(); ?>">
<img class="media-object" src="<?php echo $img[0] ?>">
</a>
</div>
<div class="media-body">
<a href="<?php the_permalink(); ?>" class="v-align">
<h4 class="media-heading"><?php the_title(); ?></h4>
<?php echo substr(get_the_excerpt(), 0,200); ?>
</a>
</div>
</div>
<?php endwhile; endif; ?>
<?php paginate_links(); ?>
</div>
<?php get_footer(); ?>