• Hola,

    creo que algo no está bien en el single.php pero no sé como arreglarlo.

    si os pongo el código me podéis ayudar?

    <?php get_header(); ?>

    <!– BEGIN content –>
    <div id=»content»>

    <?php if (have_posts()) : the_post(); ?>
    <!– begin post –>
    <div class=»single»>
    <h2><?php the_title(); ?></h2>
    <?php the_content(); ?>
    </div>
    <!– end post –>

    <div id=»comments»><?php comments_template(); ?></div>

    <?php else : ?>
    <div class=»notfound»>
    <h2>Not Found</h2>
    <p>Sorry, but you are looking for something that is not here.</p>
    </div>
    <?php endif; ?>

    </div>
    <!– END content –>

    <?php get_sidebar(); get_footer(); ?>

Viendo 10 respuestas - de la 1 a la 10 (de un total de 10)
  • Moderador almendron

    (@almendron)

    Prueba a cambiar:

    <?php if (have_posts()) : the_post(); ?>

    por

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

    Iniciador del debate almuetoile

    (@almuetoile)

    Hola, lo he probado y no funciona. Da error si lo cambio :S

    Iniciador del debate almuetoile

    (@almuetoile)

    Gracias de todos modos 🙂

    Moderador almendron

    (@almendron)

    Perdona. También tienes que cambiar

    <?php else : ?>

    Por

    <?php endwhile; else: ?>

    Iniciador del debate almuetoile

    (@almuetoile)

    ay no se ve 🙁

    ha quedado así, es correcto?
    <?php get_header(); ?>

    <!– BEGIN content –>
    <div id=»content»>

    <?php if (have_posts()): while (have_posts()): the_post(); ?>
    <!– begin post –>
    <div class=»single»>
    <h2><?php the_title(); ?></h2>
    <?php the_content(); ?>
    </div>
    <!– end post –>

    <div id=»comments»><?php comments_template(); ?></div>

    <?php endwhile; else : ?>
    <div class=»notfound»>
    <h2>Not Found</h2>
    <p>Sorry, but you are looking for something that is not here.</p>
    </div>
    <?php endif; ?>

    </div>
    <!– END content –>

    <?php get_sidebar(); get_footer(); ?>

    GRACIAS DE NUEVO

    Moderador almendron

    (@almendron)

    En principio, es correcto y debería funcionar.

    ¿Qué error te da?

    Iniciador del debate almuetoile

    (@almuetoile)

    pues entras a los post y solo se ve el titulo, no el cuerpo…

    Moderador almendron

    (@almendron)

    Indica una URL donde se pueda ver el fallo.

    Iniciador del debate almuetoile

    (@almuetoile)

    Moderador almendron

    (@almendron)

    Lo primero de todo, olvídate del single que estás construyendo y usa el original del tema que tienes activo. A ver si entonces funciona bien.

Viendo 10 respuestas - de la 1 a la 10 (de un total de 10)
  • El debate ‘No se ven las entradas de mis post’ está cerrado a nuevas respuestas.