Browse Source

fix structured image while I am at it

windhamdavid 3 years ago
parent
commit
5022ddd0bb
1 changed files with 4 additions and 2 deletions
  1. 4 2
      single.php

+ 4 - 2
single.php

@@ -7,8 +7,10 @@
 				<div class="entry-content">
 					<div class="date">
 						<time class="updated" datetime="<?php the_time('c');?>" itemprop="datePublished"><?php the_time('n/j/Y'); ?></time>
-					</div>
-					<span class="vcard author"><span class="fn">David A. Windham</span></span>
+					</div>			
+						<span class="vcard author"><span class="fn">David A. Windham</span></span>
+						<?php $img_url = wp_get_attachment_image_src(get_post_thumbnail_id(),'thumbnail'); ?>
+						<img itemprop="image" src="<?php echo $img_url[0];?>" alt="thumbnail" style="display:none"/>
 					<h2 itemprop="name headline" class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php printf( esc_attr__( 'Permalink to %s', 'daw' ), the_title_attribute( 'echo=0' ) ); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
 					<?php the_content(); ?>
 					<?php comments_template( '', true ); ?>