Ich erstelle gerade ein eigenes Theme und hänge aktuell bei den Kommentaren. Und zwar geht es mir um die threaded comments.
Er erkennt zwar das ich auf einen Kommentar antworten möchte und kann auch die Antwort abbrechen. Allerdings reloaded er die Seite und das Kommentarfeld erscheint auch nicht unter dem Kommentar auf welchen ich Antworte.
Wie benötigt habe ich im Header
eingefügt aber das JS wird nicht includet.
Testweise habe ich einfach mal
eingefügt.
Die Ausgabe war False also "<!-- WP Head fail-->".
Dann habe ich auch einfach mal den direkten HTML Code eingebunden also
<script type='text/javascript' src='http://localhost/wp-includes/js/comment-reply.js?ver=20090102'></script>
auch danach funktionierte es nicht. Bei anderen Themes funktioniert es nicht.
Ich befürchte es liegt an meiner comments.php
<?php
// Do not delete these lines
if (!empty($_SERVER['SCRIPT_FILENAME']) && 'comments.php' == basename($_SERVER['SCRIPT_FILENAME']))
die ('Please do not load this page directly. Thanks!');
if (have_comments() ) {
//Trackbacks
$trackback_count=trackback_count();
if(!empty($trackback_count)){?>
<div class="ad-468 ad-box">
<?php echo dm_ads('468'); ?>
</div>
<div class="box-wrapper">
<div class="box-top"><h2><?php echo trackback_count(); ?> zu “<?php the_title(); ?>”</h2></div>
<div class="box-down">
<ol id="commentlist">
<?php foreach ($comments as $comment) :
if (get_comment_type()!="comment") : ?>
<li id="comment-<?php comment_ID() ?>" class="comment <?php _e($thiscomment); ?>">
<?php comment_type(__('Comment'), __('Trackback'), __('Pingback')); ?>:
<?php comment_author_link(); ?>
</li>
<?php endif; endforeach;?>
</ol>
</div>
</div>
<?php
}
//Kommentare
$comment_count=comment_count();
if(!empty($comment_count)){
?>
<a name="comments"></a>
<div class="ad-468 ad-box">
<?php echo dm_ads('468'); ?>
</div>
<div class="box-wrapper">
<div class="box-top"><h2><?php echo comment_count(); ?> zu “<?php the_title(); ?>”</h2></div>
<div class="box-down">
<ol class="commentlist">
<?php wp_list_comments('type=comment&avatar_size=64'); ?>
</ol>
</div>
</div>
<?php
}
}
else{ // this is displayed if there are no comments so far
?>
<div class="ad-468 ad-box">
<?php echo dm_ads('468'); ?>
</div>
<div class="box-wrapper">
<div class="box-top"><h2>Keine Reaktionen zu “<?php the_title(); ?>”</h2></div>
<div class="box-down">Bis jetzt hatte noch keiner die Traute seinen Senf zu diesem Artikel dazu zu geben. Jetzt bist du gefragt.</div>
</div>
<?
}
//Trackback und Kommentare Ende
?>
<div class="box-wrapper" id="respond">
<div class="box-top"><?php comment_form_title( 'Dein Kommentar', 'Dein Antwort an %s' ); ?><div class="cancel-comment-reply box-buttons"><?php cancel_comment_reply_link(); ?></div></div>
<div class="box-down">
<?php if ( $user_ID ){ ?>
Angemeldet als <a href="<?php echo get_option('siteurl'); ?>/wp-admin/profile.php"><?php echo $user_identity; ?></a>. <a href="<?php echo wp_logout_url(get_permalink()); ?>" title="Log out ">Log out »</a>
<?php }else{} ?>
</div>
</div>
Alles anzeigen
Ich denke, das ich einfach eine "ID" vergessen habe oder dergleichen. Ich würde mich über Anregungen freuen