• Resolved AJ Troxell

    (@phiredesign)


    I am getting a “headers already sent error” and i know that usually this is a formatting problem (being an extra space), but this time I can’t see where the issue could be.

    I am separating out trackbacks and pings from comments.

    Here is the part that is giving me a hard time:

    <?php
    /**
     * Comments
     */
    	function squaredv2_comments($comment, $args, $depth) {
    	$GLOBALS['comment'] = $comment; ?>
    	<li <?php comment_class(); ?> id="li-comment-<?php comment_ID() ?>">
    		<div id="comment-<?php comment_ID(); ?>">
    			<div class="avatar">
    				<?php echo get_avatar($comment,$size='66' ); ?>
    			</div>
    
    			<?php if ($comment->comment_approved == '0') : ?>
    				<em><?php _e('Your comment is awaiting moderation.', 'white') ?></em>
    
    			<?php endif; ?>
    
    			<?php comment_text() ?>
    
    			<div class="comment-meta">
    				<div class="info vcard">
    					<?php printf(__('<cite class="fn">%s</cite>, '), get_comment_author_link()) ?>
    					<?php printf(__('%1$s at %2$s', 'white'), get_comment_date(),get_comment_time()) ?><?php edit_comment_link( __( '(Edit)', 'white' ), ' ' ) ?>
    				</div>
    				<?php if($args['max_depth']!=$depth) { ?>
    				<div class="reply">
    					<?php comment_reply_link(array_merge($args, array('depth' => $depth, 'max_depth' => $args['max_depth']))) ?>
    				</div>
    			<?php } ?>
    			</div>
    			<div class="clear"></div>
    		</div>
    <?php } ?>
    <?php
    /**
     * trackbacks and pings
     */
    	function squaredv2_pings($comment, $args, $depth) {
    	$GLOBALS['comment'] = $comment; ?>
    		<li id="comment-<?php comment_id(); ?>"><?php comment_author_link(); ?>
    <?php } ?>

    The error tells me that the problem is the opening php tag of the second set of code.

Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Headers already sent, but can't find error’ is closed to new replies.