Ver Mensaje Individual
  #4 (permalink)  
Antiguo 18/01/2012, 13:19
RGT
Usuario no validado
 
Fecha de Ingreso: noviembre-2008
Mensajes: 505
Antigüedad: 15 años, 5 meses
Puntos: 5
Respuesta: Codigo para mostrar el primer post

No entiendo, trato de adaptarlo a mi theme pero no logro, podrias ayudarme?

El codigo que uso es este pero, no se como agregarle todo:

Código PHP:
<div id="latestposts">
    <?php while ( have_posts() ) : the_post(); ?>
    <div id="post-<?php the_ID(); ?>" class="snippet">
        <?php if ((function_exists('has_post_thumbnail')) && (has_post_thumbnail())) : ?>
        <div class="image"><a href="<?php the_permalink(); ?>"><?php the_post_thumbnail('thumbnail'); ?></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'?> - <?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 -->
    <?php endwhile; ?>
    <?php if(function_exists('wp_pagenavi')) { wp_pagenavi(); } ?> 
</div>

<?php get_sidebar() ?>

Última edición por RGT; 18/01/2012 a las 13:49