Reply To: Creating archive page

Home Forums Support Creating archive page Reply To: Creating archive page

Home Forums Support Creating archive page Reply To: Creating archive page

#149182
Tom
Lead Developer
Lead Developer

You’d want to do something like this:

<?php
/*
Template Name: Archives
*/
get_header(); ?>

	<div id="primary" <?php generate_content_class();?>>
		<main id="main" <?php generate_main_class(); ?>>
			<?php do_action('generate_before_main_content'); ?>
			<?php while ( have_posts() ) : the_post(); ?>

				<?php the_post(); ?>
				
				<?php get_search_form(); ?>
				
				<h2>Archieven per maand:</h2>
				<ul>
					<?php wp_get_archives('type=monthly'); ?>
				</ul>
				
				<h2>Archieven per onderwerp:</h2>
				<ul>
					 <?php wp_list_categories(); ?>
				</ul>
				<h2>Archieven per Auteur:</h2>
				<ul>
					 <?php wp_list_authors('show_fullname=1&optioncount=1&orderby=post_count'); ?>
				</ul>
				<h2>Alle pagina's:</h2>
				<ul>
					<?php wp_list_pages('title_li='); ?>
				</ul>		

			<?php endwhile; // end of the loop. ?>
			<?php do_action('generate_after_main_content'); ?>
		</main><!-- #main -->
	</div><!-- #primary -->

<?php 
do_action('generate_sidebars');
get_footer();