Ver Mensaje Individual
  #16 (permalink)  
Antiguo 19/01/2012, 14:45
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

Hola, me funciona.

Aqui te pego el codigo para confirmar que sea correcto:
Código PHP:
    <?php $count 1// Seteamos count a 1 para la primer entrada ?> 

    <?php while ( have_posts() ) : the_post(); ?>
    
    <?php if ($count == 1) { ?>
    
    <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('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 -->
    
    <?php } else { // el resto de las entradas se mostraran como pongamos ahora ?> 
    
    <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'?> - <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 -->
    
    <?php $count++; endwhile;  // Final de la funcion ?>
Las lineas como:
<div id="post-<?php the_ID(); ?>" class="snippet">

estan bien, es asi?

Gracias!.