• Skip to primary navigation
  • Skip to content
  • Skip to primary sidebar
  • Skip to user navigation

PopWP

WordPress and Genesis Tutorials

  • Get Started
  • About
  • Archive
  • Services
  • Membership
  • My Account

Customize Entry Comments in Genesis

Last Updated on September 18, 2018 Favorited: 0 times

Modify the Author Says Text

//* Modify the author says text in comments
add_filter( 'comment_author_says_text', 'gk_comment_author_says_text' );
function gk_comment_author_says_text() {
	return 'author says';
}

 

Modify the Comments Link Text

//* Modify the comment link text in comments
add_filter( 'genesis_post_info', 'gk_post_info_filter' );
function gk_post_info_filter( $post_info ) {
	return '[post_comments zero="Leave a Comment" one="1 Comment" more="% Comments"]';
}

 

Modify the Comments Headline Text

//* Modify comments title text in comments
add_filter( 'genesis_title_comments', 'gk_genesis_title_comments' );
function gk_genesis_title_comments() {
	$title = '<h3>Discussion</h3>';
	return $title;
}

 

Modify the Gravatar Size

//* Modify the size of the Gravatar in comments
add_filter( 'genesis_comment_list_args', 'gk_comments_gravatar' );
function gk_comments_gravatar( $args ) {
	$args['avatar_size'] = 96;
	return $args;
}

 

Modify the Speak Your Mind Text

//* Modify the speak your mind title in comments
add_filter( 'comment_form_defaults', 'gk_comment_form_defaults' );
function gk_comment_form_defaults( $defaults ) {
 
	$defaults['title_reply'] = __( 'Leave a Comment' );
	return $defaults;
 
}

 

Modify the Trackbacks Headline Text

//* Modify trackbacks title in comments
add_filter( 'genesis_title_pings', 'gk_title_pings' );
function gk_title_pings() {
echo '<h3>Trackbacks</h3>';
}

 

Modify the Submit Button Tex

//* Customize the submit button text in comments
add_filter( 'comment_form_defaults', 'gk_comment_submit_button' );
function gk_comment_submit_button( $defaults ) {
 
        $defaults['label_submit'] = __( 'Submit', 'custom' );
        return $defaults;
 
}

 

Add A Comment Policy Box

//* Add a comment policy box in comments
add_action( 'genesis_after_comments', 'gk_comment_policy' );
function gk_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
	}
}

 

Remove the Allowed Tags Text

//* Remove comment form allowed tags
add_filter( 'comment_form_defaults', 'gk_remove_comment_form_allowed_tags' );
function gk_remove_comment_form_allowed_tags( $defaults ) {
	$defaults['comment_notes_after'] = '';
	return $defaults;
}

 

Related Posts

  • Managing Comments and Users

Categories: Free Content, Genesis Tutorials Tags: comments

Reader Interactions

Primary Sidebar

Search

WPEngine WordPress Hosting, Perfected.

Hosting You are looking for?.
Perfect solution for small business to global enterprise.

Learn more

StudioPress Genesis Theme Framework

The No.1 Theme Provider.
Creative, SEO rich Theme for all niche projects.

Learn more

Categories

  • Free Content
  • Genesis Tutorials
  • Premium Content
  • Snippets
  • What's New?
  • WordPress Tutorials

Tag Cloud

Archive Background Section blog canvas menu center logo columns conditional tags CSS CSS Grid custom Customizer custom post type Custom Post Types custom template Custom Widget effect eNews Extended Featured Image front-page Genesis Genesis Sample header right hero section Image Background js layout left menu Logo menu Navigation Menu newsletter post page related posts responsive menu search search widget Shrinking Logo site header slide in-out Stylesheet Template Utility Bar Video Background widgets WordPress

Built with Genesis Framework + WordPress by Aryan Raj

  • Contact
  • FAQ
  • Disclaimer
  • Privacy Policy
  • Copyright Policy
  • Terms of Service