Guten Tag!
Ich habe mich jetzt seit mehreren Tagen mit WP 2.7 auseinander gesetzt, so, komme ich obwohl ich nicht wirklich viel von PHP verstehe, relativ gut zurecht mit dem Code, jedoch bleibe ich bei einer Stelle einfach hängen...
Hier ein Bild, was falsch ist...
klick mich!
Wie man sieht, alles relativ durcheinander, jedoch soll jeder einzelne Beitrag im Archiv wie folgt dargestellt werden: So solls aussehen...
Nunja, was mache ich falsch, wieso es nicht klappt? So sieht meine archive.php imoment aus:
<?php
/**
* @package WordPress
* @subpackage Default_Theme
*/
get_header();
?>
<center>
<table border="0" cellspacing="0" cellpadding="0" id="content">
<tr>
<td valign="top">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td>
<?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()) { ?>
<!--html ist noetig, bei allen folgenden Zeilen auch-->
<p class="cattitel" align="center">Archiv der Kategorie <?php single_cat_title(); ?></p>
<?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 an author archive */ } elseif (is_author()) { ?>
Autoren Archiv
<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>
Blog Archiv
<!--loop hat mal Pause daher das folgende nicht loeschen-->
<?php } ?>
<table border="0" cellspacing="0" cellpadding="0" id="post">
<tr>
<td><table border="0" cellpadding="0" cellspacing="0" id="posttxt">
<tr>
<td id="title" height="40" valign="top">
<?php while (have_posts()) : the_post(); ?>
<a href="<?php the_permalink() ?>" rel="bookmark" id="post-<?php the_ID(); ?>" title="Permalink zu <?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</td>
</tr>
<tr>
<td><?php the_excerpt() ?></td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td colspan="2" align="right" id="celld"><?php comments_popup_link('Keine Kommentare', '1 Kommentar', '% Kommentare'); ?> <!--damit endet ein post-->
<?php endwhile; ?>
</td>
</tr>
</table></td>
</tr>
</table>
</td>
</tr>
</table>
<!--navi beginnt-->
<?php next_posts_link('« Vorherige Einträge') ?>
<?php previous_posts_link('Nächste Einträge »') ?>
<?php else :
if (is_category()) // wenn es ein kategorie archiv ist
printf("<p class='cattitel2'>Leider sind in der Kategorie %s noch keine Einträge verfügbar</p><br><br><br>", single_cat_title('',false));
else if (is_date()) // wenn es ein tagesarchiv ist
echo("<p class='cattitel2'>Leider gibt es keine Artikel.</p><br><br><br>");
else if (is_author()) // wenn es ein autorenarchiv ist
printf("<p class='cattitel2'>%s hat noch keinen Artikel geschrieben.</p><br><br><br>", get_userdatabylogin(get_query_var('author_name'))->display_name);
else
echo("<p class='cattitel2'>Leider keine Artikel gefunden.</p><br><br><br>");
endif;
?><!--das letzte endif endet den loop jetzt wirklich-->
<!--include footer-->
<?php get_footer(); ?>
Alles anzeigen
Ich hoffe, das jemand, der Ahnung davon hat, mir aus meiner Lage helfen kann, verzweifel da ganz schön :D
gz, monoton