[insert_php]
// WP_Query arguments
$args = array(
‘post_type’ => array( ‘point_google_map’ ), // Remplacer point_google_maps par le slug de votre CPT
‘nopaging’ => true,
‘order’ => ‘ASC’,
‘orderby’ => ‘title’,
);
$points_data = array();
// The Query
$the_query = new WP_Query($args);
// The Loop
if ($the_query->have_posts()) {
/* Start the Loop */
while ($the_query->have_posts()) {
$the_query->the_post();
$points_data[] = array(
the_title(”, ”, false),
get_field(‘adresse’),
(float)get_field(‘latitude’),
(float)get_field(‘longitude’),
);
}
}
echo ‘‘;
[/insert_php]