/
content-search.php
31 lines (29 loc) · 1.02 KB
/
content-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
<?php
/**
* displaying search results
*
*/
// Exit if accessed directly
if ( ! defined( 'ABSPATH' ) ) {
exit;
}
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
// Display post thumbnail
if ( has_post_thumbnail() && get_theme_mod( 'pg_blog_entry_thumb', '1' ) == '1' ) { ?>
<div class="search-entry-thumbnail">
<a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>">
<img src="<?php echo pg_get_featured_img_url(); ?>" alt="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>" />
</a>
</div><!-- .post-entry-thumbnail -->
<?php } ?>
<div class="search-entry-text clr">
<header>
<h2 class="search-entry-title"><a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( the_title_attribute( 'echo=0' ) ); ?>"><?php the_title(); ?></a></h2>
</header>
<div class="search-entry-content entry clr">
<?php pg_excerpt( 50 ); ?>
</div><!-- .search-entry-content -->
</div><!-- .search-entry-text -->
</article><!-- .search-entry -->