Skip to content

Commit

Permalink
add thumbnails to page and search results
Browse files Browse the repository at this point in the history
  • Loading branch information
braginteractive committed Dec 15, 2017
1 parent e6a9887 commit 935df64
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions template-parts/content-page.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,13 @@
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php if ( has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<?php the_post_thumbnail('full', array('class' => 'rounded')); ?>
</div><!-- .post-thumbnail -->
<?php endif; ?>

<header class="entry-header">
<?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
</header><!-- .entry-header -->
Expand Down
9 changes: 9 additions & 0 deletions template-parts/content-search.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,15 @@
?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>

<?php if ( has_post_thumbnail() ) : ?>
<div class="post-thumbnail">
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>">
<?php the_post_thumbnail('full', array('class' => 'rounded')); ?>
</a>
</div><!-- .post-thumbnail -->
<?php endif; ?>

<header class="entry-header">
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>

Expand Down

0 comments on commit 935df64

Please sign in to comment.