Ver Mensaje Individual
  #4 (permalink)  
Antiguo 04/12/2011, 07:15
javierm5
 
Fecha de Ingreso: abril-2011
Mensajes: 72
Antigüedad: 13 años
Puntos: 4
Respuesta: No funciona esta parte del código

Estoy usando este código:

Código PHP:
Ver original
  1. <?php
  2. //for use in the loop, list 5 post titles related to first tag on current post
  3. $tags = wp_get_post_tags($post->ID);
  4. if ($tags) {
  5.   $first_tag = $tags[0]->term_id;
  6.   $args=array(
  7.     'tag__in' => array($first_tag),
  8.     'post_type' => reviews,
  9.     'post__not_in' => array($post->ID),
  10.     'showposts'=>10,
  11.     'caller_get_posts'=>1
  12.    );
  13.   $my_query = new WP_Query($args);
  14.   if( $my_query->have_posts() ) {
  15.     while ($my_query->have_posts()) : $my_query->the_post(); ?>
  16.       <p>
  17.  
  18.  
  19.        
  20.       <?php
  21. $juego = get_post_meta($post->ID, "Carátula del juego", true);
  22. $altura = get_post_meta($post->ID, "Tipo de carátula", true);
  23. $extracto = get_post_meta($post->ID, "Descripción", true);
  24. ?>
  25.  
  26. <div class="juego-item"><div class="thumbd"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" alt="<?php the_title(); ?>"><img src="<?php echo($juego) ?>" align="left" class="<?php echo($altura) ?>" title="<?php the_title(); ?>" alt="<?php the_title(); ?>"></a></div>
  27.  
  28. <h2 class="entry-title"><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
  29. <div class="entry-content">
  30. <?php echo($extracto); ?>
  31. </div>
  32. </div>
  33.     <?php
  34.     endwhile;
  35.   }
  36. else { echo ""; }
  37. }
  38. ?>


Y me gustaría meter en el "else {echo}" este código:

<a href="<?php echo($imagen1) ?>"><img src="http://www.actualidadconsolas.com/wp-content/themes/GamerAC/scripts/timthumb.php?src=<?php echo($imagen1) ?>&h=150&w=150&zc=1&q=100&cropfrom=center" align="left" class="alignnone size-thumbnail galeria" height="150" width="150"></a> <a href="<?php echo($imagen2) ?>"><img src="http://www.actualidadconsolas.com/wp-content/themes/GamerAC/scripts/timthumb.php?src=<?php echo($imagen2) ?>&h=150&w=150&zc=1&q=100&cropfrom=center" align="left" class="alignnone size-thumbnail galeria" height="150" width="150"></a> <a href="<?php echo($imagen3) ?>"><img src="http://www.actualidadconsolas.com/wp-content/themes/GamerAC/scripts/timthumb.php?src=<?php echo($imagen3) ?>&h=150&w=150&zc=1&q=100&cropfrom=center" align="left" class="alignnone size-thumbnail galeria" height="150" width="150"></a> <a href="<?php echo($imagen4) ?>"><img src="http://www.actualidadconsolas.com/wp-content/themes/GamerAC/scripts/timthumb.php?src=<?php echo($imagen4) ?>&h=150&w=150&zc=1&q=100&cropfrom=center" align="left" class="alignnone size-thumbnail galeria" height="150" width="150"></a> <a href="<?php echo($imagen5) ?>"><img src="http://www.actualidadconsolas.com/wp-content/themes/GamerAC/scripts/timthumb.php?src=<?php echo($imagen5) ?>&h=150&w=150&zc=1&q=100&cropfrom=center" align="left" class="alignnone size-thumbnail galeria" height="150" width="150"></a>