
-
AuthorPosts
-
November 11, 2013 at 8:07 am #186737
Dear Kriesi team.
I am a new costumer and just bought the theme yesterday. I have a couple question to ask :
I want to know if there is anyway to show author picture in is a single post.
I mean not in the blog home page but in a single post when user open and read the post. Wondering if I can have the pictures of the author who write the page. My website has several author. I want the picture of each author shown in their article so that readers feel confidence when reading and comment on the article. Also the ability to link the author picture to their profile page or customised profile page.
Thank you very much.November 12, 2013 at 3:31 am #187082Hey hitokiri_kun!
You can edit includes > loop-index.php, find this code:
echo "<div class='entry-content-wrapper clearfix {$post_format}-content'>"; echo '<header class="entry-content-header">'; echo $title;
Below, add this code:
$gravatar = ""; $link = get_post_format_link($post_format); if($post_format == 'standard') { $gravatar = get_avatar( get_the_author_meta('email'), '75', "blank" ); $link = get_author_posts_url($post->post_author); } $blog_meta_output = "<a href='{$link}' class='post-author-format-type'><span class='rounded-container'>".$gravatar.$icon."</span></a>"; echo $blog_meta_output;
After that, add this on your custom.css or Quick CSS:
.single .rounded-container { display: block; position: relative; height: 50px; width: 50px; float: right; }
You can use gravatar for author images.
Regards,
IsmaelNovember 12, 2013 at 6:23 am #187131Thank you very much Ismael for quick reply. I know I made the best decision to purchase your theme.
To be honest I am really new to this.
I have added the first code to loop-index.php.
I am currently using enfold child theme, but I added the code to enfold parent theme as the child theme did not have one.
now the author picture showed in the left hand side.About the second code for css, it seems the second code you gave did not do anything to the appearance after I pasted it in the quick css in the child theme. I do not understand the purpose of the second code as everything is the same before and after the second code. Is there any overlapping between parent and child?
I heard that changing a lot of code to the parent theme will make it difficult to update to the newer version. What is you suggestion?November 12, 2013 at 6:24 am #187133here is the link to the appearance before and after the quick css: http://www.autodidak.net/antara-bekerja-dan-belajar/
November 12, 2013 at 6:26 am #187134Owh, another problem, it is now showed both authors picture in the blog page as in here : http://www.autodidak.net/blog/
I was wondering if there could be only one author picture showed in Blog Thank you.November 12, 2013 at 8:45 am #187147No problem, it works fine now. But I still want to know what will happen to the parent theme after manually editing it? I am currently using child theme as I said before. Thanks Ismael.
-
AuthorPosts
- The topic ‘Author profil picture in single post’ is closed to new replies.