Call post_class separately

This commit is contained in:
Markus Ankenbrand 2016-09-10 21:21:47 +02:00
parent c3c32d88ef
commit 9df10d5e55

View file

@ -95,9 +95,9 @@
));
foreach($tagebuch as $tb){
if(get_field('urlaub',$tb->ID)->ID === get_the_ID()){
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($tb->ID), 'post-thumb' );
echo('<a href="'.get_the_permalink($tb->ID).'" id="post-'.$tb->ID.'" '.post_class('post').' style="background-image: url('.$thumb['0'].');"><div class="post-overlay">');
echo('<a href="'.get_the_permalink($tb->ID).'" id="post-'.$tb->ID.'" ');
post_class('post');
echo(' style="background-image: url('.$thumb['0'].');"><div class="post-overlay">');
echo('<div class="archive-post-header"><p class="archive-post-date">'.get_the_time(get_option('date_format')).'</p>');
echo('<h2 class="archive-post-title">'.get_the_title($tb->ID).'</h2></div></div></a>');
}