Jump to content
Sign in to follow this  
phaseonecg

Author photo on excerpt

Recommended Posts

phaseonecg

I'm using PlatformBase. Is there a way to show the author's photo "profile picture" to show on the excerpt? I want it to show either on the top right or top left side, this is our blog home page http://www.phaseonecg.com/blog/ and if you take the example from the second post I can see the author's picture once I click on the post and read in full view http://www.phaseonecg.com/blog/?p=320. In addition to that when I read the Author's profile on the right sidebar and click on "Read full" the URL points to http://www.phaseonecg.com/blog/?author=13 which is supose to be the complete author's profile but instead in send me to all the posts by that author. Any help can be really appreaciated, I've searched all the forums in here and have found great answers for other issues except for this one. Thanks,

Share this post


Link to post
Share on other sites
Kate

Hi Raul - The issue is that the blog could have multiple authors. So, unless you hardcode the desired author's ID in, it will just use the first author's info (if any), I believe. Did you add in that "Read full"? It's actually functioning correctly... that URL is saying to get the posts by that author.

Share this post


Link to post
Share on other sites
phaseonecg

Hi Kate, you're correct on the "Read full" function, after more research I found out that if you wanted to have a page to display the author's profile you will need to modify the template. As for the multiple author's function, it only shows me one option to select the author's post, so I should be able to include the author's profile picture next to the "by author's name"

Share this post


Link to post
Share on other sites
cmunns

The author template in this case works how it's supposed to, you would have to modify the section.postauthor.php file or add hooks to add the author info at the top of that template. Something like this: ` <?php if (is_author()):?>

<?php echo get_avatar(get_the_author_meta('email', $post->post_author), $size = '150', $default = CORE_IMAGES. '/avatar_default.gif' ); ?>
<?php _e('About The Author', 'pagelines');?>

<?php echo get_the_author(); ?>

<?php the_author_meta('description', $post->post_author); ?>


<?php endif;?> ` of course this is what goes inside of the hook

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this  

×