Simplify link to Tagebuch entries
This commit is contained in:
parent
4b6d0c20a8
commit
3257afac1a
1 changed files with 5 additions and 6 deletions
11
single.php
11
single.php
|
|
@ -89,21 +89,20 @@
|
|||
</script>
|
||||
</div>
|
||||
|
||||
<h2> Tagebucheinträge in diesem Urlaub </h2>
|
||||
<ul>
|
||||
<?php
|
||||
$tagebuch = get_posts(array(
|
||||
'category_name' => 'Tagebuch'
|
||||
));
|
||||
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', $tb->ID);
|
||||
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>');
|
||||
echo('<li><a href="'.get_the_permalink($tb->ID).'" id="post-'.$tb->ID.'" ');
|
||||
echo(get_the_title($tb->ID).'</a></li>');
|
||||
}
|
||||
}
|
||||
?>
|
||||
</ul>
|
||||
<?php endif; ?>
|
||||
|
||||
<?php
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue