Fix formatting add log for Tour category
This commit is contained in:
parent
acaf68022a
commit
43347a763b
1 changed files with 20 additions and 20 deletions
|
|
@ -23,13 +23,12 @@ add_filter('acf/fields/google_map/api', 'my_acf_google_map_api');
|
||||||
|
|
||||||
// Related posts function
|
// Related posts function
|
||||||
function atravelblog_related_posts() {
|
function atravelblog_related_posts() {
|
||||||
|
|
||||||
echo('<div class="related-posts posts section-inner">');
|
echo('<div class="related-posts posts section-inner">');
|
||||||
global $post;
|
global $post;
|
||||||
$thisID = get_the_ID();
|
$thisID = get_the_ID();
|
||||||
if ( get_the_category()[0]->name == 'Urlaub' ){
|
$cat = get_the_category()[0]->name;
|
||||||
|
if ( $cat == 'Urlaub' ){
|
||||||
$tagebuch = new WP_Query( array( 'category_name' => 'Tagebuch' ) );
|
$tagebuch = new WP_Query( array( 'category_name' => 'Tagebuch' ) );
|
||||||
|
|
||||||
if ($tagebuch->have_posts()) :
|
if ($tagebuch->have_posts()) :
|
||||||
while ( $tagebuch->have_posts() ) : $tagebuch->the_post();
|
while ( $tagebuch->have_posts() ) : $tagebuch->the_post();
|
||||||
global $post;
|
global $post;
|
||||||
|
|
@ -41,7 +40,8 @@ function atravelblog_related_posts() {
|
||||||
echo('<div class="clear"></div>');
|
echo('<div class="clear"></div>');
|
||||||
echo('</div> <!-- /related-posts -->');
|
echo('</div> <!-- /related-posts -->');
|
||||||
wp_reset_query();
|
wp_reset_query();
|
||||||
|
} elseif($cat == 'Tour') {
|
||||||
|
var_dump(get_field('urlaub'));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue