map here'; return $mp_api_script; } add_shortcode('lejourduprof_map', 'mp_add_div'); //function print_content($content){ // // // print only on the page 'map', and other conditions // // https://developer.wordpress.org/reference/hooks/the_content/ // if (!( is_page('map_prof') && in_the_loop() && is_main_query() )) // return $content; // // // https://developer.wordpress.org/reference/functions/get_posts/ // $get_posts_args = array( // 'numberposts' => -1, // 'post_status' => 'publish', // ); // // $posts_list = get_posts($get_posts_args); // $content .= "
"; // $content .= "nb posts published : "; // $content .= count($posts_list); // $content .= "
"; // foreach ($posts_list as $post_value) { // $content .= ""; // //$content .= "nb posts published : "; // //$content .= count($posts_list); // //$content .= "
"; // //foreach ($posts_list as $post_key => $post_value) { // // $content .= "";
// // $content .= "post content : ";
// // $content .= $post_key;
// // $content .= " : ";
// // $content .= "
";
// // foreach ($post_value as $key => $value) {
// // $content .= "- [";
// // $content .= $key;
// // $content .= "]: [";
// // $content .= $value;
// // $content .= "]
";
// // }
// // $content .= "