• I am managing a couple of blogs… and I am having an issue with one of the blogs pulling the right code for the comments section.

    the function
    <?php comments_template();?>

    Is supposed to enact the current theme’s comments.php file if it exists.. and the default theme’s comments.php file if it doesn’t.

    The code that is actually getting written doesn’t match either of those files (or any installed theme’s comments.php file for that matter)

    It might help me, as I am trouble shooting, to figure out where the code exists that is getting written.

    the code that is getting written looks like this

    <ol class="commentlist" style="list-style-type: none;">
    		<li class="alt" id="comment-652">
    			<img alt='' src='http://www.gravatar.com/etc..' class='avatar avatar-32 photo' height='32' width='32' />
    <div class="comment-number">1</div>
    <cite>J. Doe</cite> Says:
    <br />
    			<small class="commentmetadata"><a href="http://thesite.com/?p=19700&amp;cp=1#comment-652" title="">March 6th, 2009 at 12:16 pm</a> &nbsp;&nbsp;<a href="http://thesite.com/wp-admin/comment.php?action=editcomment&amp;c=652" title="Edit comment">edit</a></small>
    			<p>blah blah blah.. the comment text</p>
    		</li>

    Any idea where this code is getting pulled? and how I might be able to get comments_template() to pull the theme’s comments.php file?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter oneone11

    (@oneone11)

    After looking at how the comment_template function operates I tried passing the file variable even though it is set by default.

    comments_template('/comments.php');

    and that fixed it. Has anyone else had this issue?

    Moderator Samuel Wood (Otto)

    (@otto42)

    ww.wp.xz.cn Admin

    That HTML markup looks like what the default theme’s comments.php would output, actually. The call to wp_list_comments() produces code similar to that.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Comment code written isn’t in theme’s comments.php.. nor default’s…’ is closed to new replies.