Forum Replies Created
-
AuthorPosts
-
stacyvlasitsMember
Mary, my guess is that you are putting a function declaration in your template file that has already been declared elsewhere (most likely in functions.php). You can fix this by removing the function declaration from the template file.
My guess is that this is the culprit:
function minimum_add_body_class( $classes )stacyvlasitsMemberIs it bad form to /bump a post in this forum? I'm worried I may have posted this too late in the day for it to be seen.
stacyvlasitsMemberNat, as I noted, Brad's solution is almost certainly the right choice for you (and probably for most situations).
Also, Brad, that function really looks like the way to go.
I took the code from the
genesis_comment_callback
which is in genesis/lib/structure/comments.phpstacyvlasitsMemberBrad's solution is probably the best way to solve your problem, but it is a teeny bit hacky in that it leaves html on your page that you really don't want.
In case anyone is interested, here is a complicated (but cleaner) way to implement this.
In your functions.php file
add_filter('genesis_comment_list_args', 'my_custom_comment_list_args')
. Then define the function:function my_custom_comment_list_args($args){
$args = array(
'callback' = 'custom_comment_callback_no_date',)
}
Define a function like this in functions.php (it is a copy of the callback that genesis uses, only without the comment date/time):
function custom_comment_callback_no_date( $comment, $args, $depth ) {$GLOBALS['comment'] = $comment; ?>
<li <?php comment_class(); ?> id="comment-<?php comment_ID(); ?>">
<?php do_action( 'genesis_before_comment' ); ?>
<div class="comment-header">
<div class="comment-author vcard">
<?php echo get_avatar( $comment, $size = $args['avatar_size'] ); ?>
<?php printf( __( '<cite class="fn">%s</cite> <span class="says">%s:</span>', 'genesis' ), get_comment_author_link(), apply_filters( 'comment_author_says_text', __( 'says', 'genesis' ) ) ); ?>
</div><!-- end .comment-author --></div>
<div class="comment-content">
<?php if ( $comment->comment_approved == '0' ) : ?>
<p class="alert"><?php echo apply_filters( 'genesis_comment_awaiting_moderation', __( 'Your comment is awaiting moderation.', 'genesis' ) ); ?></p>
<?php endif; ?><?php comment_text(); ?>
</div><!-- end .comment-content --><div class="reply">
<?php comment_reply_link( array_merge( $args, array( 'depth' => $depth, 'max_depth' => $args['max_depth'] ) ) ); ?>
</div><?php do_action( 'genesis_after_comment' );
/** No ending </li> tag because of comment threading */
}
-
AuthorPosts