Ist es möglich, die comments.php folgender maßen anzugeben? also ohne eine abfrage, ob der user eingeloggt sein muss etc.
PHP
<div class="comment">
<?php if ( post_password_required() ) : ?>
<p><?php _e('Enter your password to view comments.'); ?></p>
<?php return; endif; ?>
<?php if ( have_comments() ) : ?>
<!--- Kommentaranzeige --->
<ul id="commentlist">
<?php foreach ($comments as $comment) : ?>
<li <?php comment_class(); ?> id="comment-<?php comment_ID() ?>">
<p class="meta"><u><em><?php comment_author_link() ?> - am <?php comment_date() ?></em></u></p>
<?php comment_text() ?>
</li>
<?php endforeach; ?>
</ul>
<?php else : ?>
<!--- Alternativtext --->
<p class="meta"><?php _e('Bisher gibt es keine Kommentare.'); ?></p>
<?php endif; ?>
<form action="<?php echo get_option('siteurl'); ?>/wp-comments-post.php" method="post" id="commentform">
<p><input type="text" name="author" id="author" value="..." onclick="this.value=' '" size="22" tabindex="1" /> <label for="author"><small><?php _e('Name'); ?> <?php if ($req) _e('(required)'); ?></small></label></p>
<p><input type="text" name="email" id="email" value="..." onclick="this.value=' '" size="22" tabindex="2" /> <label for="email"><small><?php _e('Mail (will not be published)');?> <?php if ($req) _e('(required)'); ?></small></label></p>
<p><textarea name="comment" id="comment" cols="42" rows="4" tabindex="4"></textarea></p>
<p><input name="submit" type="submit" id="submit" tabindex="5" value="<?php esc_attr_e('Submit Comment'); ?>" /> <input type="hidden" name="comment_post_ID" value="<?php echo $id; ?>" /></p>
<?php do_action('comment_form', $post->ID); ?>
</form>
</div>
Alles anzeigen