Hallo Zusammen
Ich muss das Category Template so anpassen damit man das Archiv mit den Jahren in der jeweiligen Kategorie hat.
Beispiel der gewollten Ausgabe Ansicht:
Archiv (Kategorienname)
2012
- Post Eintrag
- Post Eintrag
- Post Eintrag
- Post Eintrag
- Post Eintrag
2011
- Post Eintrag
- Post Eintrag
- Post Eintrag
2010
- Post Eintrag
- Post Eintrag
- Post Eintrag
- Post Eintrag
- Post Eintrag
Nur wie mach ich dies im Category Template damit es mir automatisch die Jahre erkennt und diese i die jeweiligen Jahres Archiv eintrag ausgibt?
Das Category Template sieht im Moment so aus:
PHP
get_header(); ?>
<section id="primary">
<div id="content" role="main">
<?php if ( have_posts() ) : ?>
<div id="category-boxs-long" class="row archiv">
<div class="span9 title">
<h4 class="category-title">
Archiv (<?php echo single_cat_title( '', false ); ?>)</h4>
</div>
<?php twentyeleven_content_nav( 'nav-above' ); ?>
<?php while ( have_posts() ) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" class="span9">
<div class="post-content">
<h5 class="post-title"><a href="<?php the_permalink(); ?>"
title="<?php printf( esc_attr__( 'Permalink to %s', 'twentyeleven' ), the_title_attribute( 'echo=0' ) ); ?>"
rel="bookmark"><?php the_title(); ?></a>
</h5>
<?php the_excerpt(); ?>
</div>
</article><!-- #post-<?php the_ID(); ?> -->
<?php endwhile; ?>
<?php twentyeleven_content_nav( 'nav-below' ); ?>
<?php else : ?>
<article id="post-0" class="post no-results not-found">
<header class="entry-header">
<h1 class="entry-title"><?php _e( 'Nothing Found', 'twentyeleven' ); ?></h1>
</header><!-- .entry-header -->
<div class="entry-content">
<p><?php _e( 'Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'twentyeleven' ); ?></p>
<?php get_search_form(); ?>
</div><!-- .entry-content -->
</article><!-- #post-0 -->
<?php endif; ?>
</div><!-- end category-boxs-long -->
</div><!-- #content -->
</section><!-- #primary -->
<?php get_sidebar(); ?>
Alles anzeigen
Ich hoffe jemand kann mir hier weiterhelfen.