Lego2012
12/14/2016 - 1:51 PM

Author Box

Author Box

<?php
//* Do NOT include the opening php tag

<!-- Below is the code to remove the Author Box on single posts: -->

//* Remove the author box on single posts XHTML Themes
remove_action( 'genesis_after_post', 'genesis_do_author_box_single' );

//* Remove the author box on single posts HTML5 Themes
remove_action( 'genesis_after_entry', 'genesis_do_author_box_single', 8 );

<!-- Below is the code to globally enable the Author Box on single posts: -->
  
//* Display author box on single posts
add_filter( 'get_the_author_genesis_author_box_single', '__return_true' );

<!-- Below is the code to globally enable the Author Box on archive pages: -->

//* Display author box on archive pages
add_filter( 'get_the_author_genesis_author_box_archive', '__return_true' );

<!-- Below is the code to modify the Author Box title on your site: -->

//* Customize the author box title
add_filter( 'genesis_author_box_title', 'custom_author_box_title' );
function custom_author_box_title() {
    return '<strong>About the Author</strong>';
}

<!-- Below is the code to modify the size of the Gravatar on your site: -->

//* Modify the size of the Gravatar in the author box
add_filter( 'genesis_author_box_gravatar_size', 'author_box_gravatar_size' );
function author_box_gravatar_size( $size ) {
    return '80';
}

<!-- Below is sample CSS to customize the Author Box on your site: ->

/* Author Box
------------------------------------------------------------ */
 
.author-box {
    background-color: #f5f5f5;
    border: 1px solid #ddd;
    margin: 0 0 40px;
    overflow: hidden;
    padding: 10px;
}
 
.author-box p {
    font-size: 14px;
}