Hello, I’ve modified my child theme’s functions.php file to read as below in an attempt to get the Instagram link to appear but it’s not working. Is there something I’ve missed in my code specific to Instagram?
// Add Link to Author Bio Section
// =============================================================================
function x_shortcode_x_author_update_2( $atts ) {
extract( shortcode_atts( array(
‘id’ => ‘’,
‘class’ => ‘’,
‘style’ => ‘’,
‘title’ => ‘’,
‘author_id’ => ‘’
), $atts, ‘x_author’ ) );
$id = ( $id != ‘’ ) ? ‘id="’ . esc_attr( $id ) . ‘"’ : ‘’;
$class = ( $class != ‘’ ) ? 'x-author-box cf ’ . esc_attr( $class ) : ‘x-author-box cf’;
$style = ( $style != ‘’ ) ? ‘style="’ . $style . ‘"’ : ‘’;
$title = ( $title != ‘’ ) ? $title : __( ‘About the Author’, csl18n() );
$author_id = ( $author_id != ‘’ ) ? $author_id : get_the_author_meta( ‘ID’ );
$description = get_the_author_meta( ‘description’, $author_id );
$display_name = get_the_author_meta( ‘display_name’, $author_id );
$facebook = get_the_author_meta( ‘facebook’, $author_id );
$twitter = get_the_author_meta( ‘twitter’, $author_id );
$instagram = get_the_author_meta( ‘instagram’, $author_id );
$facebook_output = ( $facebook ) ? “<a href=”{$facebook}" class=“x-author-social” title=“Visit the Facebook Profile for {$display_name}” target="_blank"><i class=“x-icon-facebook-square” data-x-icon=“”> Facebook" : ‘’;
$twitter_output = ( $twitter ) ? “<a href=”{$twitter}" class=“x-author-social” title=“Visit the Twitter Profile for {$display_name}” target="_blank"><i class=“x-icon-twitter-square” data-x-icon=“”> Twitter" : ‘’;
$instagram_output = ( $instagram ) ? “<a href=”{$instagram}" class=“x-author-social” title=“Visit the Instagram Profile for {$display_name}” target="_blank"><i class=“x-icon-instagram-square” data-x-icon=“”> Instagram" : ‘’;
$output = “<div {$id} class=”{$class}" {$style}>"
. “<h6 class=“h-about-the-author”>{$title}”
. get_avatar( $author_id, 180 )
. ‘
. ‘’ ."<h4 class=“h-author mtn”>{$display_name}"
. $facebook_output
. $twitter_output
. $instagram_output
. “<p class=“p-author mbn”>{$description}”
. ‘
. ‘’;
return $output;
}
add_action(‘wp_head’, ‘x_author_update’);
function x_author_update () {
remove_shortcode( ‘x_author’ );
add_shortcode( ‘x_author’, ‘x_shortcode_x_author_update_2’ );
}