68 lines
No EOL
1.5 KiB
PHP
68 lines
No EOL
1.5 KiB
PHP
<?php
|
|
/*
|
|
Template Name: Sitemap
|
|
*/
|
|
get_header();
|
|
while ( have_posts() ) : the_post();?>
|
|
|
|
|
|
<div class="planSite content">
|
|
<h1><?php the_title(); ?></h1>
|
|
<h2><?php _e('Pages', 'textdomain'); ?></h2>
|
|
<ul><?php wp_list_pages("title_li=" ); ?></ul>
|
|
<h2><?php _e('Gammes', 'textdomain'); ?></h2>
|
|
<ul>
|
|
<?php
|
|
$args = array(
|
|
'post_type' => 'gamme',
|
|
'posts_per_page' => -1,
|
|
'offset' => 0,
|
|
'orderby'=> 'menu_order',
|
|
'order' => 'DESC',
|
|
'post_status'=> 'publish',
|
|
);
|
|
$posts = get_posts( $args );
|
|
foreach ( $posts as $post ) : setup_postdata( $post );
|
|
?>
|
|
<li><?php the_title(); ?></li>
|
|
<?php
|
|
endforeach;
|
|
wp_reset_postdata();
|
|
?>
|
|
</ul>
|
|
<h2><?php _e('Marques', 'textdomain'); ?></h2>
|
|
<ul>
|
|
<?php
|
|
$args = array(
|
|
'posts_per_page' => -1,
|
|
'post_type' => 'marque',
|
|
'offset' => 0,
|
|
'orderby'=> 'date',
|
|
'order' => 'DESC',
|
|
'post_status'=> 'publish',
|
|
);
|
|
$posts = get_posts( $args );
|
|
foreach ( $posts as $post ) : setup_postdata( $post );
|
|
?>
|
|
<li>
|
|
<?php the_title(); ?>
|
|
</li>
|
|
<?php
|
|
endforeach;
|
|
wp_reset_postdata();
|
|
?>
|
|
</ul>
|
|
<h2><?php _e('Tous les articles', 'textdomain'); ?></h2>
|
|
<ul><?php $archive_query = new WP_Query('showposts=1000'); while ($archive_query->have_posts()) : $archive_query->the_post(); ?>
|
|
<li>
|
|
<a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a>
|
|
|
|
</li>
|
|
<?php endwhile; ?>
|
|
</ul>
|
|
</div>
|
|
<?php
|
|
// End the loop.
|
|
endwhile;
|
|
get_footer(); // inclut la page footer.php
|
|
?>
|