Ver Mensaje Individual
  #3 (permalink)  
Antiguo 08/12/2013, 14:29
Abelmelero
 
Fecha de Ingreso: marzo-2009
Mensajes: 168
Antigüedad: 15 años, 1 mes
Puntos: 1
Respuesta: Cómo añadir el "leer más" a las categorías de wordpress

Hola Alejandro,

Muchas gracias por tú respuesta, pero no tengo ni idea de donde colocar ese código y no sé lo que es que me devuelva el html ni el add filter ni qué tengo que sustituir. Copio y pego el código de mi archive.php y si eres tan amable y quieres me dices dónde debería colocar el código que me has puesto.

Código PHP:

<?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>

<h3> <?php echo category_description(); ?></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 ?>

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


<div class="entry-body">


<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>

<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('Escribe un comentario''1 comentario''% comentarios'); ?></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(); ?>