Plan du site






get_sitemap();

$nl = « \n »;
$sitemap=’

    ‘;
    foreach($sitemap_array as $element){

    //set the link priority, based on the saved options
    switch($element[‘type’]){
    case ‘posts':
    $priority=get_option(‘sg_posts_priority’);
    break;
    case ‘pages':
    $priority=get_option(‘sg_pages_priority’);
    break;
    case ‘categories':
    $priority=get_option(‘sg_categories_priority’);
    break;
    case ‘tags':
    $priority=get_option(‘sg_tags_priority’);
    break;
    case ‘home':
    $priority=’1′;
    break;
    }

    if($priority!= »0″){
    $sitemap.=’

  • ‘.$element[‘post_title’].’
  • ‘;
    }

    }
    $sitemap.=’

‘;

echo $sitemap;

?>