Ver Mensaje Individual
  #7 (permalink)  
Antiguo 09/11/2011, 08:35
lobos1981
 
Fecha de Ingreso: abril-2011
Ubicación: Colombia
Mensajes: 59
Antigüedad: 13 años, 1 mes
Puntos: 19
Respuesta: Asignar ID a Thumbnails

UFFF! Que pena con ustedes...

Creo q mejor les paso todo el código xD

Este es el Orbit original:

Código HTML:
Ver original
  1. <div id="featured">
  2.      <img src="overflow.jpg" alt="Overflow: Hidden No More" />
  3.      <img src="captions.jpg"  alt="HTML Captions" [COLOR="Red"]data-caption="#htmlCaption"[/COLOR] />
  4.      <img src="features.jpg" alt="and more features" />
  5. </div>
  6. <!-- Captions for Orbit -->
  7. <span class="orbit-caption" [COLOR="Red"]id="htmlCaption"[/COLOR]>I'm A Badass Caption</span>

----------------------------------------
Revisando caí en cuenta y NO es el atributo id sino:
Código HTML:
Ver original
  1. data-caption="#Aquí si el id del post"

(Anteponiéndole el signo numeral dentro de comillas...)

Ejemplo:

Código HTML:
Ver original
  1. data-caption="#[COLOR="Red"]Aquí si el id del post[/COLOR]"

Y este es orbit.php que estoy "tratando" de implementar en wordpress; "jala" las thumbnails pero los captions(descripciones) :S aun no:

Además...
Como pueden observar en <!-- Captions for Orbit --> dice id="<?php the_ID(); ?>" y efectivament coloca el id del post... pero necesito q la thumbnail tambn lleve el mismo id... y para remate anteponerle el signo # ¿Complicado eh?

Código PHP:
Ver original
  1. <div id="featured">
  2.     <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  3.                 <?php
  4.                 if ( has_post_thumbnail() ) {
  5.                   the_post_thumbnail();     // Esta es la parte q falta...
  6.                 }                
  7.                 ?>
  8.                
  9. <!-- Captions for Orbit -->
  10. <span class="orbit-caption" id="<?php the_ID(); ?>" style="color:#F00;">
  11.  
  12.         <a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
  13.         <?php include (TEMPLATEPATH . '/inc/meta.php' ); ?>
  14.         <?php the_excerpt(); ?>
  15.  
  16. </span>
  17.  
  18.     <?php endwhile;?>
  19.     <?php else :?>
  20.     <?php endif;?>
  21.  
  22. <script type="text/javascript">
  23.      $(window).load(function() {
  24.          $('#featured').orbit({
  25.             bullets: true,
  26.             captions: true,              
  27.                     captionAnimation: 'fade',      
  28.                     captionAnimationSpeed: 800,      
  29.             });
  30.      });
  31. </script>
  32. </div>

Última edición por Nekko; 10/11/2011 a las 07:14