Thanks so much for upgrading!
The icon font used in Author unfortunately doesn’t have an icon for Goodreads yet. However, if you can create or get access to an icon for your site then I can certainly help out with the customization.
You’ll want to copy the “ct_author_social_icons_output()” function in functions.php into your child theme’s functions.php file to override it. Then you can simply hardcode the Goodreads icon in. This is easier than adding it to the Customizer and should work fine for one site.
Here’s an example of how I would include icon after the other icons:
function ct_author_social_icons_output() {
$social_sites = ct_author_social_array();
$square_icons = array(
'linkedin',
'twitter',
'vimeo',
'youtube',
'pinterest',
'rss',
'reddit',
'tumblr',
'steam',
'xing',
'github',
'google-plus',
'behance',
'facebook'
);
foreach ( $social_sites as $social_site => $profile ) {
if ( strlen( get_theme_mod( $social_site ) ) > 0 ) {
$active_sites[ $social_site ] = $social_site;
}
}
if ( ! empty( $active_sites ) ) {
echo "<div class='social-media-icons'><ul>";
foreach ( $active_sites as $key => $active_site ) {
// get the square or plain class
if ( in_array( $active_site, $square_icons ) ) {
$class = 'fa fa-' . $active_site . '-square';
} else {
$class = 'fa fa-' . $active_site;
}
if ( $active_site == 'email-form' ) {
$class = 'fa fa-envelope-o';
}
if ( $active_site == 'email' ) { ?>
<li>
<a class="email" target="_blank"
href="mailto:<?php echo antispambot( is_email( get_theme_mod( $active_site ) ) ); ?>">
<i class="fa fa-envelope" title="<?php echo esc_attr_x( 'email', 'noun', 'author' ); ?>"></i>
<span class="screen-reader-text"><?php echo esc_html_x('email', 'noun', 'author'); ?></span>
</a>
</li>
<?php } elseif ( $active_site == 'skype' ) { ?>
<li>
<a class="<?php echo esc_attr( $active_site ); ?>" target="_blank"
href="<?php echo esc_url( get_theme_mod( $active_site ), array( 'http', 'https', 'skype' ) ); ?>">
<i class="<?php echo esc_attr( $class ); ?>"
title="<?php echo esc_attr( $active_site ); ?>"></i>
<span class="screen-reader-text"><?php echo esc_html( $active_site ); ?></span>
</a>
</li>
<?php } else { ?>
<li>
<a class="<?php echo esc_attr( $active_site ); ?>" target="_blank"
href="<?php echo esc_url( get_theme_mod( $active_site ) ); ?>">
<i class="<?php echo esc_attr( $class ); ?>"
title="<?php echo esc_attr( $active_site ); ?>"></i>
<span class="screen-reader-text"><?php echo esc_html( $active_site ); ?></span>
</a>
</li>
<?php
}
} ?>
<li>
<a class="goodreads" target="_blank"
href="https://goodreads.com/profile">
<img src="https://website.com/image.png" />
<span class="screen-reader-text">Goodreads</span>
</a>
</li><?php
echo "</ul></div>";
}
}
Edit: Oof sorry about the formatting! The relevant piece is at the bottom.
-
This reply was modified 7 years, 2 months ago by
Ben Sibley.