This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Modify trackbacks title in comments | |
add_filter( 'genesis_title_pings', 'topleague_title_pings' ); | |
function topleague_title_pings() { | |
echo '<h3>Trackbacks</h3>'; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Add a comment policy box in comments | |
add_action( 'genesis_after_comments', 'topleague_comment_policy' ); | |
function topleague_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>Zero tolerance for spammy comments.</small></p> | |
</div> | |
<?php | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Modify the 'Leave a Reply' title in comments | |
add_filter( 'comment_form_defaults', 'topleague_comment_form_defaults' ); | |
function topleague_comment_form_defaults( $defaults ) { | |
$defaults['title_reply'] = __( 'Share Your Thoughts' ); | |
return $defaults; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove Comment Time & Link Inside the Date Field in Genesis (h/t: http://www.jowaltham.com/customising-comment-date-genesis/) | |
add_filter( 'genesis_show_comment_date', 'topleague_remove_comment_time_and_link' ); | |
function topleague_remove_comment_time_and_link( $comment_date ) { | |
printf( '<p %s>', genesis_attr( 'comment-meta' ) ); | |
printf( '<time %s>', genesis_attr( 'comment-time' ) ); | |
echo esc_html( get_comment_date() ); | |
echo '</time></p>'; | |
// Return false so that the parent function doesn't also output the comment date and time |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Modify the size of the Gravatar in comments | |
add_filter( 'genesis_comment_list_args', 'topleague_comments_gravatar' ); | |
function topleague_comments_gravatar( $args ) { | |
$args['avatar_size'] = 96; // change the number depending on your requirement | |
return $args; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//* Modify comments title text in comments | |
add_filter( 'genesis_title_comments', 'topleague_genesis_title_comments' ); | |
function topleague_genesis_title_comments() { | |
$title = '<h3>What They Say</h3>'; | |
return $title; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add or remove notes after the comment box | |
add_filter( 'comment_form_defaults', 'topleague_remove_comment_form_allowed_tags' ); | |
function topleague_remove_comment_form_allowed_tags( $defaults ) { | |
$defaults['comment_notes_after'] = 'Enter the Following Details'; | |
return $defaults; | |
} |