Author's Profile Picture

Hi I don’t know how will Author’s Profile Picture by displayed in the posts, only name is displaying. i did not have problem with my previous theme of Twenty Sixteen. if you can please guide me so I may enter in Child Theme. Regards

Hi,

Did you saw Authors Profile picture showing somewhere on Our demo: http://demo.athemes.com/newsanchor/?

Best Regards,
Csaba

Hello, what that supposed to mean?

anyway. i figured it out.

  1. Just make a child theme
  2. enter this in function.php

function newsanchor_posted_on() {
$time_string = ‘<time class=“entry-date published updated” datetime="%1$s">%2$s</time>’;
if ( get_the_time( ‘U’ ) !== get_the_modified_time( ‘U’ ) ) {
$time_string = ‘<time class=“entry-date published” datetime="%1$s">%2$s</time><time class=“updated” datetime="%3$s">%4$s</time>’;
}

$time_string = sprintf( $time_string,
	esc_attr( get_the_date( 'c' ) ),
	esc_html( get_the_date() ),
	esc_attr( get_the_modified_date( 'c' ) ),
	esc_html( get_the_modified_date() )
);
	

$byaliID =   get_the_author_meta( 'ID' )	;
$byaliDisplayName = get_the_author_meta('display_name');
$bylone = get_avatar($byaliID,49,'',$byaliDisplayName)  ;

$posted_on = '<a href="' . esc_url( get_permalink() ) . '" rel="bookmark">' . $time_string . '</a>';

$byline = sprintf(
	esc_html_x( '%s', 'post author', 'newsanchor' ),
	'&lt;span class="author vcard"&gt;<a href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '">' . esc_html( get_the_author() ) .  '</a>&lt;/span&gt;'
);



echo  '&lt;/span&gt; &lt;span class="byline"&gt; ' . $bylone  .  $byline .  '&lt;span class="posted-on date"&gt;' . $posted_on . '&lt;/span&gt;';

$categories_list = get_the_category_list( __( ', ', 'newsanchor' ) );
if ( $categories_list &amp;&amp; newsanchor_categorized_blog() ) {
	echo '&lt;span class="categories"&gt; ' . $categories_list . '&lt;/span&gt;';
}

}

Well Done. I am not a developer but I figured that out. ha ha ha

Hi,

Great! I’m glad it’s resolved and thank you for posting the fix! If you need help with anything else, please open a new topic.

Have a nice day!

Best Regards,
Csaba