Ver Mensaje Individual
  #3 (permalink)  
Antiguo 01/07/2013, 14:21
Abelmelero
 
Fecha de Ingreso: marzo-2009
Mensajes: 168
Antigüedad: 15 años, 1 mes
Puntos: 1
Respuesta: Cómo mostrar los post de una categoria completos.

Hola Zanguanga,

Gracias por responder. He estado probando el código que me has puesto y no funciona, de hecho a veces se me "rompe" la página, otras no funciona directamente, no se donde copiarlo. Mira te copio el código de mi archive.php (creo que es ahí donde debo pegarlo, ya que ahí es donde modifico las categorías y donde está el excerp.

Código:
<?php get_header(); ?>



<div id="content">



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



<?php $post = $posts[0]; // Hack. Set $post so that the_date() works. ?>

<?php /* If this is a category archive */ if (is_category()) { ?>



<h3 class="pagetitle"> ‘<?php single_cat_title(); ?>’</h3>



<?php /* If this is a tag archive */ } elseif( is_tag() ) { ?>

<h3 class="pagetitle">Posts Tagged ‘<?php single_tag_title(); ?>’</h3>

<?php /* If this is a daily archive */ } elseif (is_day()) { ?>

<h3 class="pagetitle">Archive for <?php the_time('F jS, Y'); ?></h3>

<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>

<h3 class="pagetitle">Archive for <?php the_time('F, Y'); ?></h3>

<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>

<h3 class="pagetitle">Archive for <?php the_time('Y'); ?></h3>

<?php /* If this is an author archive */ } elseif (is_author()) { ?>

<h3 class="pagetitle">Author Archive</h3>

<?php /* If this is a paged archive */ } elseif (isset($_GET['paged']) && !empty($_GET['paged'])) { ?>

<h3 class="pagetitle">Blog Archives</h3>

<?php } ?>

<h3> <?php echo category_description(); ?></h3>


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


<div class="entry-body">

<div class="entry-date"><?php the_time('jS F Y') ?></div>

<div class="entry-text">

<h1><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>" class="entry-title"><?php the_title(); ?></a></h1>

<div class="entry-time">Posted on <?php the_time() ?>&nbsp;<?php edit_post_link('Edit'); ?></div>

</div>

<p><?php excerpt('50'); ?></p>

<div class="entry-meta">

<span class="entry-category"><?php the_category(', ') ?></span>

<span class="entry-comment"><?php comments_popup_link('Leave a comment', '1 comment', '% comments'); ?></span>

</div>

</div>



<?php endwhile; ?>

<?php

include('wp-pagenavi.php');

if(function_exists('wp_pagenavi')) { wp_pagenavi(); }

?>






<?php else : ?>



<div class="entry-body">

<h2 class="pagetitle">Not Found</h2>

<?php include (TEMPLATEPATH . '/searchform.php'); ?>

</div>



<?php endif; ?>



</div><!-- END Content -->



<?php get_sidebar(); ?>

<?php get_footer(); ?>
Gracias por tu tiempo.