Add all locations to array

This commit is contained in:
Markus Ankenbrand 2017-02-19 17:57:40 +01:00
parent 7b162367d0
commit 544d31a478

View file

@ -60,11 +60,16 @@
<?php
query_posts( 'category_name=urlaub&posts_per_page=1000' );
$postIDs = array();
$locations = array();
while ( have_posts() ) : the_post();
$postIDs[] = $post->ID;
$places = get_field('orte');
if($places){
foreach ($places as $place){
$locations[] = array("post" => $post->ID, "place" => $place);
}
}
endwhile;
var_dump($postIDs);
var_dump($locations);
?>