<?php get_header();
/*
* Template name: Sitemap
*/
?>
<div class="container-fluid">
<div class="container">
<div class="row">
<div class="col-xs-12 col-sm-12 col-md-12" id="main">
<?php if(get_field('aangepaste_titel')):?>
<h1><?php the_field('titel_aangepast'); ?></h1>
<?php else: ?>
<h1><?php the_title(); ?></h1>
<?php endif; ?>
<?php foreach( get_post_types( array('public' => true) ) as $post_type ) {
if ( in_array( $post_type, array('attachment') ) )
continue;
$pt = get_post_type_object( $post_type );
echo '<h2>'.$pt->labels->name.'</h2>';
echo '<ul>';
query_posts('post_type='.$post_type.'&posts_per_page=-1');
while( have_posts() ) {
the_post();
echo '<li><a href="'.get_permalink().'">'.get_the_title().'</a></li>';
}
echo '</ul>';
};
?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
#sitemap #template