Doku » Creating an Archive Index
<?php get_header(); ?>
<?php if (have_posts()) : ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
Archiv der Kategorie '<?php echo single_cat_title(); ?>'
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
Tagesarchiv für den <?php the_time('j. F Y'); ?>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?> Monatsarchiv für <?php the_time('F Y'); ?>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?> Jahresarchiv für <?php the_time('Y'); ?>
<?php /* If this is a search */ } elseif (is_search()) { ?> Suchergebnisse
<?php /* If this is an author archive */ } elseif (is_author()) { ?> Autoren Archiv
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?> <Blog Archiv
<?php } ?>
<?php next_posts_link('« Vorherige Einträge') ?>
<?php previous_posts_link('Nächste Einträge »') ?>
<?php while (have_posts()) : the_post(); ?>
<h3 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h3>
<?php the_time('l,') ?> den <?php the_time('j. F Y') ?>
<?php the_excerpt() ?>
Kategorie <?php the_category(', ') ?> | <?php comments_popup_link('0 Kommentar »', '1 Kommentar »', '% Kommentare »'); ?> <?php edit_post_link('Bearbeiten','| ',); ?>
<?php endwhile; ?>
<?php next_posts_link('« Vorherige Einträge') ?>
<?php previous_posts_link('Nächste Einträge »') ?>
<?php else : ?>
Nicht gefunden.
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>