Hello
On my blog page, I would like to display a postlist with first a picture of the author and then a short excerpt of what he/she wrote in his/her last post. How do i set this up?
Display postlist with excerpts
6 posts from 2 voices-
Posted 1 year ago #
-
Hey,
Upscale and WordPress don't offer such a widget/plugin by default. However I'm sure that you'll find some useful plugins/widgets in the plugin repository: http://wordpress.org/extend/plugins/search.php?q=author+widget&sort=Posted 1 year ago # -
is thre a way to make a "defualte" <--more--> setting for the blgo page then?
Lets say i maximum want to display 500 characters, if you want to read the rest, youll have to click inPosted 1 year ago # -
Yes that's possible. First you need to modify includes/loop-index.php though. Open up the file and replace:
<?php the_content('<span class="inner_more">'.__('Read more','avia_framework').'</span>'); ?>with:
<?php if(is_single()){ the_content('<span class="inner_more">'.__('Read more','avia_framework').'</span>'); }else{ the_excerpt(); echo "<span class='inner_more'><a href='".get_permalink()."'>".__('Read more','avia_framework')."</a></span>"; } ?>If you'd like to change the default excerpt you can use the excerpt option field or you can adjust the default excerpt legnth. By default, excerpt length is set to 55 words. To change excerpt length add the following code to functions.php:
function new_excerpt_length($length) { return 20; } add_filter('excerpt_length', 'new_excerpt_length');and change 20 to any value you like.
Posted 1 year ago # -
Perfect, Thnx! got one last question for you;
Any way i can get the avatar of the autor in there now?Posted 1 year ago # -
I haven't tested it myself but you can try to use: http://codex.wordpress.org/Function_Reference/the_author_meta and http://codex.wordpress.org/Function_Reference/get_avatar - combined it would (imho) look like:
<?php echo get_avatar( get_the_author_meta('user_email'), '80' ); ?>For more information refer to: http://codex.wordpress.org/Function_Reference/get_avatar
You can insert the code somewhere in includes/loop-index.php. Please note that I can't give further support regarding styling, etc.Posted 1 year ago #
Reply
You must log in to post.














