Fix query for Tagebuch entries
This commit is contained in:
parent
85e4123b27
commit
189bf114a2
1 changed files with 6 additions and 4 deletions
10
single.php
10
single.php
|
|
@ -91,11 +91,13 @@
|
|||
|
||||
<?php
|
||||
$tagebuch = get_posts(array(
|
||||
'category_name' => 'Tagebuch',
|
||||
'meta_key' => 'urlaub', // name of custom field
|
||||
'meta_value' => '"' . get_the_ID() . '"', // matches exaclty "123", not just 123. This prevents a match for "1234"
|
||||
'category_name' => 'Tagebuch'
|
||||
));
|
||||
var_dump($tagebuch);
|
||||
foreach($tagebuch as $tb){
|
||||
if(get_field('urlaub',$tb->ID)->ID === get_the_ID()){
|
||||
get_template_part( 'content', get_post_format($tb->ID) );
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php endif; ?>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue