Ver Mensaje Individual
  #10 (permalink)  
Antiguo 09/11/2011, 10:30
Avatar de rogertm
rogertm
Mod->Cuba
 
Fecha de Ingreso: julio-2005
Ubicación: /home/Cuba/Habana/rogertm/
Mensajes: 2.922
Antigüedad: 18 años, 9 meses
Puntos: 638
Respuesta: Asignar ID a Thumbnails

Para que the_ID() te funcione, tienes que usarlo dentro del Loop, de otra manera creo (CREO) que tienes que hacer global la variable $post.

Habría que probar ... ¿Ese <div id="featured"> está dentro de algún Loop? osea, dentro de algún código como este: <?php if (have_posts()) : while (have_posts()) : the_post(); ?> ... En ese caso si podrás hacer algo como esto:
Código PHP:
Ver original
  1. data-caption="#<?php the_ID() ?>"
__________________
Friki y Blogger por Cuenta Propia:213
Twenty'em: Theming is Prose