Cómo solucionar un error al mostrar contenido según la categoría en PHP

  • Autor Autor sebasxnco
  • Fecha de inicio Fecha de inicio
S

sebasxnco

Épsilon
PHP:
<?php if ( in_category('5') ) : ?> 
  <left><a href="<?php the_permalink() ?>"><img src="<?php echo get_post_meta($post->ID, "Image", true);?>" width="150" right"150" /></a> </left>
<?php the_excerpt(); ?> 
  
<?php elseif ?>  

 <?php if ( in_category('9') ) : ?> 
  
<?php the_excerpt(); ?> 
  
<?php else ?>         
  
<?php the_content(); ?> 
  
<?php endif ?>

gracias de antemano
 
No lo probé pero intenta con este a ver...

PHP:
<?php if ( in_category('5') ) : ?>
  <left><a href="<?php the_permalink() ?>"><img src="<?php echo get_post_meta($post->ID, "Image", true);?>" width="150" right"150" /></a> </left>
<?php the_excerpt(); ?>
<?php endif ?>

 <?php if ( in_category('9') ) : ?>
  
<?php the_excerpt(); ?>
  
<?php else { the_content(); }?>
  
<?php endif ?>
 
El problema esta en la segunda linea no es "right" (derecho) si no "height" (alto) =p ingles basico bro xD

PHP:
<?php if ( in_category('5') ) : ?>
  <left><a href="<?php the_permalink() ?>"><img src="<?php echo get_post_meta($post->ID, "Image", true);?>" width="150" height"150" /></a> </left>
 
El problema esta en la segunda linea no es "right" (derecho) si no "height" (alto) =p ingles basico bro xD

PHP:
<?php if ( in_category('5') ) : ?>
  <left><a rel="nofollow" href="<?php the_permalink() ?>"><img src="<?php echo get_post_meta($post->ID, "Image", true);?>" width="150" height"150" /></a> </left>

Venia a ver si podia ayudar y me lleve una gran sonrisa jejej.

Me mataste con tu comentario V.I.H. 😛 y supongo que ahi se arregla el problema
 
Ojo que es height="150".... y no height"150"

!!!

slds
 
Emmm, el elseif también esta mal:

PHP:
<?php if ( in_category('5') ) : ?>  
  <left><a href="<?php the_permalink() ?>"><img src="<?php echo get_post_meta($post->ID, "Image", true);?>" width="150" right"150" /></a> </left> 
<?php the_excerpt(); ?>  
   
<?php elseif( in_category('9') ) : ?>   
   
<?php the_excerpt(); ?>  
   
<?php else : ?>          
   
<?php the_content(); ?>  
   
<?php endif; ?>
 
Atrás
Arriba