Cita:
como ven he utilizado while para remplazar algunas variables, si quisiera agregar otro meta_value que seria el año $ano como lo aplico osea no se si me entienden, cada variable alli es un campo personalizado, entonces hay ya utilize un campo personalizado como utilizo varios que dijiera ya esta la iamgen, ahora quiero poner el año, categoria, y una description como seria el codigo para lograr ello muchas gracias a todos. <?php
$musica=mysql_query("SELECT t1.slug AS slug, t1.term_id AS term_id, t2.object_id AS object_id, t2.term_taxonomy_id AS term_taxonomy_id, t3.ID AS ID, t3.post_title AS post_title, t3.post_date AS post_date, t3.post_name AS post_name, t3.post_type AS post_type, t4.meta_key AS meta_key, t4.meta_value AS meta_value, t4.post_id AS post_id FROM wp_terms AS t1 INNER JOIN wp_term_relationships AS t2 INNER JOIN wp_posts AS t3 INNER JOIN wp_postmeta AS t4 ON (t2.object_id = t3.ID && t2.term_taxonomy_id = t1.term_id && t1.slug = '2010' && t3.post_type = 'post' && t3.ID = t4.post_id && t4.meta_key = 'thumbnail') WHERE post_status= 'publish' GROUP BY t3.post_name ORDER by t3.post_date DESC limit 8",$conexion);
while($row1 = mysql_fetch_assoc($musica)) {
$titlee = utf8_encode($row1['post_title']);
$imagen = $row1['meta_value'];
$date = $row1['post_date'];
$dire = $row1['post_name'];
echo '<div class="slideshow"><a title="'.$titlee.'" href="http:/misitio.com/cancionero/'.$dire.'.html" target="_blank"><img src="images/'.$imagen.'" alt="'.$titlee.'" width="83" height="125"></a></div>';
}
?>
$musica=mysql_query("SELECT t1.slug AS slug, t1.term_id AS term_id, t2.object_id AS object_id, t2.term_taxonomy_id AS term_taxonomy_id, t3.ID AS ID, t3.post_title AS post_title, t3.post_date AS post_date, t3.post_name AS post_name, t3.post_type AS post_type, t4.meta_key AS meta_key, t4.meta_value AS meta_value, t4.post_id AS post_id FROM wp_terms AS t1 INNER JOIN wp_term_relationships AS t2 INNER JOIN wp_posts AS t3 INNER JOIN wp_postmeta AS t4 ON (t2.object_id = t3.ID && t2.term_taxonomy_id = t1.term_id && t1.slug = '2010' && t3.post_type = 'post' && t3.ID = t4.post_id && t4.meta_key = 'thumbnail') WHERE post_status= 'publish' GROUP BY t3.post_name ORDER by t3.post_date DESC limit 8",$conexion);
while($row1 = mysql_fetch_assoc($musica)) {
$titlee = utf8_encode($row1['post_title']);
$imagen = $row1['meta_value'];
$date = $row1['post_date'];
$dire = $row1['post_name'];
echo '<div class="slideshow"><a title="'.$titlee.'" href="http:/misitio.com/cancionero/'.$dire.'.html" target="_blank"><img src="images/'.$imagen.'" alt="'.$titlee.'" width="83" height="125"></a></div>';
}
?>
Salu2