Comments
<?php
//* Do NOT include the opening php tag shown above. Copy the code shown below.
<!-- Below is the code to modify the comments link on your site: -->
//* Modify the comment link text in comments
add_filter( 'genesis_post_info', 'sp_post_info_filter' );
function sp_post_info_filter( $post_info ) {
return '[post_comments zero="Leave a Comment" one="1 Comment" more="% Comments"]';
}
<!-- Below is the code to modify the Comments title text on your site: -->
//* Modify comments title text in comments
add_filter( 'genesis_title_comments', 'sp_genesis_title_comments' );
function sp_genesis_title_comments() {
$title = '<h3>Discussion</h3>';
return $title;
}
<!-- Below is the code to modify the Trackbacks title text on your site: -->
//* Modify trackbacks title in comments
add_filter( 'genesis_title_pings', 'sp_title_pings' );
function sp_title_pings() {
echo '<h3>Trackbacks</h3>';
}
<!-- Below is the code to modify the Speak Your Mind title text on your site: -->
//* Modify the speak your mind title in comments
add_filter( 'comment_form_defaults', 'sp_comment_form_defaults' );
function sp_comment_form_defaults( $defaults ) {
$defaults['title_reply'] = __( 'Leave a Comment' );
return $defaults;
}
<!-- Below is the code to modify the author says text on your site: -->
//* Modify the author says text in comments
add_filter( 'comment_author_says_text', 'sp_comment_author_says_text' );
function sp_comment_author_says_text() {
return 'author says';
}
<!-- Below is the code to modify the size of the Gravatar on your site: -->
//* Modify the size of the Gravatar in comments
add_filter( 'genesis_comment_list_args', 'sp_comments_gravatar' );
function sp_comments_gravatar( $args ) {
$args['avatar_size'] = 96;
return $args;
}
<!-- Below is the code to modify the submit button text text on your site: -->
//* Customize the submit button text in comments
add_filter( 'comment_form_defaults', 'sp_comment_submit_button' );
function sp_comment_submit_button( $defaults ) {
$defaults['label_submit'] = __( 'Submit', 'custom' );
return $defaults;
}
<!-- Below is the code to add a comment policy box to your site: -->
//* Add a comment policy box in comments
add_action( 'genesis_after_comments', 'sp_comment_policy' );
function sp_comment_policy() {
if ( is_single() && !is_user_logged_in() && comments_open() ) {
?>
<div class="comment-policy-box">
<p class="comment-policy"><small><strong>Comment Policy:</strong>Your words are your own, so be nice and helpful if you can. Please, only use your real name and limit the amount of links submitted in your comment. We accept clean XHTML in comments, but don't overdo it please.</small></p>
</div>
<?php
}
}
<!-- Below is the code to remove the allowed tags text above the comment form: -->
//* Remove comment form allowed tags
add_filter( 'comment_form_defaults', 'sp_remove_comment_form_allowed_tags' );
function sp_remove_comment_form_allowed_tags( $defaults ) {
$defaults['comment_notes_after'] = '';
return $defaults;
}