Problema con the_content() cortando post sin <!--more-->

  • Autor Autor Lopezito
  • Fecha de inicio Fecha de inicio
Lopezito

Lopezito

Zeta
Diseñador
Verificación en dos pasos activada
Verificado por Whatsapp
[SOLUCIONADO]

Tengo un problema con un loop que diferencia el primer post de los demas, y cual es?, que the_content corta el post(como the_excerpt()) sin que yo declare <!-- more -->

PHP:
 <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>

<div class="post">
<div class="leftpost">
<a href="<?php the_permalink(); ?>" alt="Fuente.com" title="Fuente.com"><img src="imagen" width="80" height="80" alt="<?php the_title(); ?>" /><span>Fuente.com</span></a>
</div>
<div class="rightpost">
 <h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Enlace permanente a <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

<?php if($count == 1 && $paged == 1) : ?>
 <div class="entry" >
  <?php the_content();?>
 </div >
<?php else :?>
 <div class="entry" >
  <?php the_excerpt(); ?>
 </div >
<?php endif; ?>
</div>
</div>
 <?php endwhile; else: ?>
 <p>No hay nada.</p>
 <?php endif; ?>
<?php next_posts_link('Ver artículos anteriores..'); ?>
<?php previous_posts_link('Ver artículos más recientes..'); ?>
<!--loop-->

- - - Actualizado - - -

Nadie?😕
 
Última edición:
No sé muy bien lo que quieres hacer pero trata con:

HTML:
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> 
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?> 
<div class="post"> 
<div class="leftpost"> 
<a href="<?php the_permalink(); ?>" alt="Fuente.com" title="Fuente.com"><img src="imagen" width="80" height="80" alt="<?php the_title(); ?>" /><span>Fuente.com</span></a>
 </div> 
<div class="rightpost"> 
 <h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Enlace permanente a <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
 
<?php if($count == 1 && $paged == 1) : ?> 
 <div class="entry" > 
  <?php the_content();?> 
 </div > 
<!--<?php else :?> 
 <div class="entry" > 
  <?php the_excerpt(); ?> 
 </div >--> 
<?php endif; ?> 
</div> 
</div> 
 <?php endwhile; else: ?> 
 <p>No hay nada.</p> 
 <?php endif; ?> 
<?php next_posts_link('Ver artículos anteriores..'); ?> 
<?php previous_posts_link('Ver artículos más recientes..'); ?> 
<!--loop-->

Tengo un problema con un loop que diferencia el primer post de los demas, y cual es?, que the_content corta el post(como the_excerpt()) sin que yo declare <!-- more -->

PHP:
 <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>

<div class="post">
<div class="leftpost">
<a rel="nofollow" href="<?php the_permalink(); ?>" alt="Fuente.com" title="Fuente.com"><img src="imagen" width="80" height="80" alt="<?php the_title(); ?>" /><span>Fuente.com</span></a>
</div>
<div class="rightpost">
 <h2 class="entry-title"><a rel="nofollow" href="<?php the_permalink() ?>" rel="bookmark" title="Enlace permanente a <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

<?php if($count == 1 && $paged == 1) : ?>
 <div class="entry" >
  <?php the_content();?>
 </div >
<?php else :?>
 <div class="entry" >
  <?php the_excerpt(); ?>
 </div >
<?php endif; ?>
</div>
</div>
 <?php endwhile; else: ?>
 <p>No hay nada.</p>
 <?php endif; ?>
<?php next_posts_link('Ver artículos anteriores..'); ?>
<?php previous_posts_link('Ver artículos más recientes..'); ?>
<!--loop-->

- - - Actualizado - - -

Nadie?😕
 
[MENTION=4380]DoctorPC[/MENTION] el código que tipeaste en sí está mal, pero ya logre solucionarlo, olvide editar :drunk:
 
Era tu mismo código con una parte comentada :drunk:
Pero si ya lo resolviste me parece bien 🙂

Enlace eliminado el código que tipeaste en sí está mal, pero ya logre solucionarlo, olvide editar :drunk:
 
Era tu mismo código con una parte comentada :drunk:
Pero si ya lo resolviste me parece bien 🙂

Es que vi que agregaste la "comentada" y me parecio que estaba mal puesta :drunk:
 
Atrás
Arriba