hallo,
PHP
<?php if (is_search()) { ?>
<?php } ?>
<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>
<?php /* If this is a category archive */ if (is_category()) { ?>
<h1>Archiv für ‘
<?php single_cat_title(); ?>
’</h1>
<?php /* If this is a daily archive */ } elseif (is_day()) { ?>
<h1>Archiv für
<?php the_time('j. F Y'); ?>
</h1>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h1>Archiv für
<?php the_time('F Y'); ?>
</h1>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h1>Archiv für
<?php the_time('Y'); ?>
</h1>
<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>
<h1>Einträge getagged ‘
<?php single_tag_title(); ?>
’</h1>
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h1>Autor Archiv für
<?php the_author_posts_link(); ?>
</h1>
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
<h1>Seiten Archiv</h1>
<?php /* If this is the archives page */ } elseif (is_page('Archives')) { ?>
<?php } ?>
Alles anzeigen
folgender code definiert die diversen headlines für meine verschiedenen archive. entweder sortiert nach datum oder nach autor archiv.
PHP
<?php /* If this is an author archive */ } elseif (is_author()) { ?>
<h1>Autor Archiv für
<?php the_author_posts_link(); ?>
</h1>
es funktioniert alles, außer dass mir hier kein AUTOREN-name ausgegeben wird. seht ihr da einen fehler? muss ich den autor anders abfragen?