El blog es: www.oyeeso.com
Tengo para mostrar los post en la portada esto:
Código PHP:
<div class="snippet" style="background-color:#FFF">
<?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) : ?>
<div class="image"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('medium'); ?></a></div>
<?php endif; ?>
<h3 class="title"><a href="<?php the_permalink() ?>" title="<?php the_title() ?>" rel="bookmark"><?php the_title() ?></a></h3>
<p class="meta"><?php the_category(', '); ?> - <?php the_time('j / F / Y') ?> - <fb:comments-count href=<?php the_permalink(); ?>></fb:comments-count> comentarios - <?php if(function_exists('the_views')) { the_views(); } ?></p>
<div class="excerpt"><p><?php echo shortExcerpt(get_the_excerpt(), (int) get_option('of_excerpt_length')); ?></p></div>
</div><!-- .snippet -->
Código PHP:
/*-----------------------------------------------------------------------------------*/
/* Shortens the excerpt */
/*-----------------------------------------------------------------------------------*/
function shortExcerpt($excerpt, $chars) {
if (strlen($excerpt) <= $chars) {
return $excerpt; //do nothing
}
else {
$str = wordwrap($excerpt, $chars);
$str = substr($str, 0, strpos($str, "\n"));
return $str . " [...]";
}
}
=(