Ver Mensaje Individual
  #2 (permalink)  
Antiguo 08/02/2013, 20:02
American2010
 
Fecha de Ingreso: abril-2003
Mensajes: 1.129
Antigüedad: 21 años
Puntos: 34
Respuesta: titulos con texto y numeracion delante

Bueno, no lo he probado, pero si dices que el PHP funcionó, el error está acá:

Estás dejando del $c = 1 dentro del while, por lo que cada vez que se ejecuta el while, el $c vuelve a ser 1

Cambia:

Código PHP:
Ver original
  1. <?php global $query_string; ?>
  2.     <?php query_posts( $query_string . '&order=ASC&posts_per_page=50&tag=herencia&post_status=publish, future' ); while ( have_posts() ) : the_post(); ?>
  3.     <?php $c = 1 ?>
  4.     <?php if ($post->post_status == 'future'): ?>
  5.     <h3><?php the_title("tema $c"); ?></h3>
  6.            <?php else : ?>
  7.     <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title("tema $c"); ?></a></h3>
  8.      <?php $c++?>
  9.     <?php endif ; ?>
  10.     <?php endwhile; wp_reset_query();?>

Por:

Código PHP:
Ver original
  1. <?php $c = 1 ?>
  2. <?php global $query_string; ?>
  3.     <?php query_posts( $query_string . '&order=ASC&posts_per_page=50&tag=herencia&post_status=publish, future' ); while ( have_posts() ) : the_post(); ?>
  4.  
  5.     <?php if ($post->post_status == 'future'): ?>
  6.     <h3><?php the_title("tema $c"); ?></h3>
  7.            <?php else : ?>
  8.     <h3><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title("tema $c"); ?></a></h3>
  9.      <?php $c++?>
  10.     <?php endif ; ?>
  11.     <?php endwhile; wp_reset_query();?>

Imagino que debería funcionar.

PD: Esas lineas donde aparece $c = 1 y la de $c++, no deberían llevar también el ; al final?
__________________
elGastronomo