Hallo,
ich habe schon das Forum durchsucht und auch Google bemüht, aber noch keine Lösung für mein problem gefunden.
Ich beziehe mich auf die beiden Threads: Kommentare gleich auf Hauptseite und Kommentare unter Artikel direkt einblenden.
Ich möchte auch, dass die Kommentare schon auf der "Kategorie-Seite" zu sehen sind. Zum Beispiel hier: Post SV Oldenburg
Leider klappt das bei mir nicht. Wahrscheinlich liegt es daran, dass ich ein anderes Theme benutze. Aber ich bin auch ein ziemlicher "Programmier-Laie".
Also ich benutze WP 2.2.1
und meine Index.php sieht so aus:
PHP
<?php get_header(); ?>
<div id="content_main"><!-- the content -->
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="post"><!-- the post -->
<div class="post-date">
<span class="post-month"><?php the_time(__('M')) ?></span>
<span class="post-day"><?php the_time(__('d')) ?></span></div>
<h1 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h1>
<p class="date"><?php the_time(__('l, j. F Y G:i','avenue')) ?><?php edit_post_link(__(' | Eintrag bearbeiten','avenue'),'',''); ?></p>
<div class="entry_main"><!-- the entry -->
<?php the_content(__(' [...]','avenue')); ?>
</div><!-- end of the entry -->
<p class="info_main"><?php _e('Thema: ','avenue'); ?><?php the_category(', ') ?> <strong>| </strong>
<?php comments_popup_link(__('Kommentare (0)','avenue'), __('Kommentare (1)','avenue'), __('Kommentare (%)','avenue')); ?></p>
</div><!-- end of the post -->
<?php endwhile; ?>
<div class="navigation">
<div class="alignleft"><?php posts_nav_link('','',__('« vorherige Beiträge','avenue')) ?></div>
<div class="alignright"><?php posts_nav_link('',__('nächste Beiträge »','avenue'),'') ?></div>
</div>
<?php else : ?>
<h2><?php _e('Nichts gefunden','avenue'); ?></h2>
<p class="center"><?php _e('Sorry, Du suchst nach etwas das nicht hier ist.','avenue'); ?></p>
<?php include (TEMPLATEPATH . "/searchform.php"); ?><?php endif; ?>
</div><!-- end of the content -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
Alles anzeigen
Meine comments.php so
PHP
<?php // Do not delete these lines
if ('comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if (!empty($post->post_password)) { // if there's a password
if ($_COOKIE['wp-postpass_' . COOKIEHASH] != $post->post_password) { // and it doesn't match the cookie
?>
<p class="nocomments"><?php _e('Dieser Beitrag ist passwortgeschützt.','avenue'); ?><p>
<?php
return;
}
}
/* This variable is for alternating comment background */
$oddcomment = 'alt';
?>
<!-- You can start editing here. -->
<?php if ($comments) : ?>
<p class="comment_title"><?php comments_number(__('Keine Kommentare','avenue'), __('Ein Kommentar','avenue'), __('% Kommentare','avenue') );?></p>
<ol class="commentlist">
<?php $relax_comment_count=1; ?>
<?php foreach ($comments as $comment) : ?>
<li class="commentbody" id="comment-<?php comment_ID() ?>">
<div id="com_info">
<?php comment_author_link() ?>
<?php if ($comment->comment_approved == '0') : ?>
<em><?php _e(' (Beitrag erwartet Moderation)','avenue') ?></em>
<?php endif; ?><br />
<a class="commentlink" href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('l, j. F Y') ?> <?php comment_time('G:i') ?></a> <?php edit_comment_link(' | Edit'); ?>
</div>
<div class="commentcount"><?php echo $relax_comment_count; ?></div><br />
<?php comment_text() ?>
</li>
<?php $relax_comment_count++; ?>
<?php endforeach; /* end for each comment */ ?>
</ol>
<?php else : // this is displayed if there are no comments so far ?>
<?php if ('open' == $post-> comment_status) : ?>
<!-- If comments are open, but there are no comments. -->
<?php else : // comments are closed ?>
<!-- If comments are closed. -->
<p class="nocomments"><?php _e('Keine weiteren Kommentare möglich.','avenue'); ?></p>
<?php endif; ?>
<?php endif; ?>
<?php if ('open' == $post-> comment_status) : ?>
<h3 id="respond"><?php _e('Kommentar abgeben','avenue'); ?></h3>
<?php if ( get_option('comment_registration') && !$user_ID ) : ?>
<p><?php _e('Login erforderlich','avenue'); ?></p>
<?php else : ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<?php if ( $user_ID ) : ?>
<?php else : ?>
<p><input type="text" name="author" id="author" value="<?php echo $comment_author; ?>" size="22" tabindex="1" />
<label for="author"><small><?php _e('Name','avenue'); ?> <?php if ($req) _e('(erforderlich)','avenue'); ?></small></label></p>
<p><input type="text" name="email" id="email" value="<?php echo $comment_author_email; ?>" size="22" tabindex="2" />
<label for="email"><small><?php _e('E-Mail (wird nicht veröffentlicht, ','avenue'); ?><?php if ($req) _e('notwendig)','avenue'); ?></small></label></p>
<p><input type="text" name="url" id="url" value="<?php echo $comment_author_url; ?>" size="22" tabindex="3" />
<label for="url"><small><?php _e('Website (freiwillig)','avenue'); ?></small></label></p>
<?php endif; ?>
<!--<p><small><strong>XHTML:</strong> You can use these tags: <?php echo allowed_tags(); ?></small></p>-->
<p><textarea name="comment" id="comment" cols="50" rows="8" tabindex="4"></textarea></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php _e('Senden','avenue'); ?>" />
<input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" />
</p>
<?php do_action('comment_form', $post->ID); ?></form>
<?php endif; // If registration required and not logged in ?>
<?php endif; // if you delete this the sky will fall on your head ?>
Alles anzeigen
Vielleicht kann mir ja jemand helfen. Was muss ich wo eintragen?
Danke
Gruß Sven