Created
December 11, 2016 19:10
-
-
Save matthewtlh/51af32baf5c5d9122fd8cbce23a4f332 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="searchResultsDonate"> | |
<?php | |
if( has_post_thumbnail() ) { ?> | |
<?php | |
$thumb_id = get_post_thumbnail_id(); | |
$thumb_url = wp_get_attachment_image_src($thumb_id,'full', true); | |
?> | |
<div style="background-image: url(<?php echo $thumb_url[0]; ?>); | |
background-size: cover; color:#fff; text-align:left; border:none; padding: 2%; width: 100%; margin: 0; "> | |
<?php } else { ?> | |
<div style="background:<?php echo get_post_meta( get_the_ID(), 'background color', true ); ?>; "> | |
<?php } ?> | |
<a href="<?php echo get_post_meta( get_the_ID(), 'Event RSVP Link', true ); ?>" target="_blank"><h3><?php echo get_post_meta( get_the_ID(), 'Header 1', true ); ?></h3> | |
<h2><?php the_title(); ?></h2> | |
<p><?php the_excerpt(); ?></p></a> | |
</div> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment