Add all locations to array
This commit is contained in:
parent
7b162367d0
commit
544d31a478
1 changed files with 8 additions and 3 deletions
|
|
@ -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);
|
||||
?>
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue