Skip to content

Instantly share code, notes, and snippets.

@topleague
topleague / comments-headline-text.php
Created June 28, 2017 07:42
Modify the Comments Headline Text in Genesis
//* 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;
}
@topleague
topleague / comment-submit-button.php
Last active June 28, 2017 08:49
Modify Submit Button in Genesis
//* Customize the submit button text in comments
add_filter( 'comment_form_defaults', 'topleague_comment_submit_button' );
function topleague_comment_submit_button( $defaults ) {
$defaults['label_submit'] = __( 'Post Comment');
return $defaults;
}
@topleague
topleague / comment-gravatar.php
Last active June 28, 2017 08:59
Modify the Comment Gravatar Size in Genesis
//* 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;
}
@topleague
topleague / author-says.php
Last active June 28, 2017 09:09
Modify Author Says in Genesis
//* Modify the author says text in comments
add_filter( 'comment_author_says_text', 'topleague_comment_author_says_text' );
function topleague_comment_author_says_text() {
return 'writes'; // if you want to remove the text, simply keep it ''
}
@topleague
topleague / related-grid-genesis.css
Created June 29, 2017 14:49
Display Related Posts in Grid Format in Genesis
@topleague
topleague / author-gravatar-post-info.php
Created July 1, 2017 03:30
Author Gravatar in Post Info in Genesis
// Display Author Gravatar in Post Info in Genesis
@link https://wpsites.net/web-design/display-post-author-avatar-byline/
add_action('genesis_entry_header', 'topleague_post_author_avatar');
function topleague_post_author_avatar() {
if (is_single() ) {
echo get_avatar(get_the_author_meta('email'), 40); // change the number to increse/decrease gravatar size
}}
@topleague
topleague / font-awesome-genesis.php
Created July 1, 2017 15:27
Load Font Awesome in Genesis
// Load Font Awesome
add_action( 'wp_enqueue_scripts', 'enqueue_font_awesome' );
function enqueue_font_awesome() {
wp_enqueue_style( 'font-awesome', '//maxcdn.bootstrapcdn.com/font-awesome/latest/css/font-awesome.min.css' );
}
@topleague
topleague / featured-image-caption.css
Last active July 1, 2017 15:34
Style Featured Image Caption in Genesis
@topleague
topleague / featured-image-caption.php
Last active July 2, 2017 11:30
Display Featured Image with Caption in Genesis
@topleague
topleague / author-avatar-above-entry-title.php
Created July 6, 2017 14:34
Display Author Avatar above the Entry Title
// Display Author Avatar above Entry Title
add_action('genesis_before_entry', 'topleague_post_author_avatar');
function topleague_post_author_avatar() {
if (is_single() ) {
echo '<div class="entry-avatar">';
echo get_avatar(get_the_author_meta('email'), 110);
echo '</div>';
}}