Ayudenme con carrusel de mi web porfavor

  • Autor Autor joelandy14
  • Fecha de inicio Fecha de inicio
joelandy14

joelandy14

VIP
Iota
Verificado
Verificación en dos pasos activada
Suscripción a IA
Hola, tengo una plantilla que consegui por hay

y no se como cambiar la categoria a mostrarte en este slider o carrusel, quiero poner la categoria de ESTRENOS .
slidder.jpg



Logre ubicar el codigo del carrusel y otros pero nose como cambiarlo, alguien me puede ayudar?


PHP:
<!-- modulo -->
<div id="car_top">
<div class="capa_a">
<i class="a"></i>
</div>
<div class="capa_b">
<i class="b"></i>
</div>
<div id="carrutop">
<ul>


<?php  $rand_posts = get_posts('numberposts=5&orderby=rand'); foreach( $rand_posts as $post ) : ?>

<?php   if (has_post_thumbnail()) {
$imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID),'medium');
$imgsrc = $imgsrc[0];
} elseif ($postimages = get_children("post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=0")) {
foreach($postimages as $postimage) {
$imgsrc = wp_get_attachment_image_src($postimage->ID, 'medium');
$imgsrc = $imgsrc[0];
}
} elseif (preg_match('/<img [^>]*src=["|\']([^"|\']+)/i', get_the_content(), $match) != FALSE) {
$imgsrc = $match[1];
} else {
$filmaffinity = get_post_custom_values("Poster");
$imgsrc = $filmaffinity[0];
} ?>
<li>
<a href="<?php the_permalink() ?>"><i></i>
<div class="img"><img src="<?php echo $imgsrc; $imgsrc = ''; ?>" alt="<?php the_title(); ?> - <?php echo $terms = strip_tags( $terms = get_the_term_list( $post->ID, 'fecha-estreno' ));  ?>" />
<span class="year"><?php echo $terms = strip_tags( $terms = get_the_term_list( $post->ID, 'fecha-estreno' ));  ?></span>
<?php if($coo = $terms = strip_tags( $terms = get_the_term_list( $post->ID, 'calidad' ))) {  ?>
<span class="calidad"><?php echo $coo; ?></span>
<?php } else { ?>
<span class="calidad">SD</span>
<?php } ?>

</div>
</a>
</li>
<?php endforeach; ?>
</ul>
</div>
</div>
<!-- fin modulo -->
 
creo que utilizamos el mismo theme.. he puesto un array con la categoría de estreno
PHP:
<?php 
$args = array(
'category_name' => 'estreno',
'post_per_page' => 30,
'ignore_sticky_posts' => 1
);
$query1 = new WP_Query($args);
if($query1->have_posts()) : while($query1->have_posts()) : $query1->the_post(); $do_not_duplicate = $post->ID;?>
<li>
<a href="<?php the_permalink();?>">
<div class="img">
<?php if ( has_post_thumbnail() ) {
$foto = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'medium' );
$src = $foto['0'];
echo '<img src="'.$src.'" alt="'.get_the_title().'" width="140px" height="177px">';
}else{ ?>
<img src="<?php bloginfo('template_url');?>/images/no-img-home.png" alt="<?php the_title();?>" width="140px" height="177px">
<?php }?>
<span class="year"><?php echo $terms = strip_tags( $terms = get_the_term_list( $post->ID, 'fecha-estreno'));  ?></span>
<?php if($Calidad = $terms = strip_tags( $terms = get_the_term_list( $post->ID, 'calidad' ))) {  ?>
<span class="calidad"><?php echo $Calidad; ?></span>
<?php } else { ?>
<span class="calidad">SD</span>
<?php } ?>

</div>
</a>
</li>
<?php endwhile; else : ?>
<h2 style="text-align:center;">Agrega peliculas con la categoria estreno</h2>
<?php endif; wp_reset_postdata(); ?>
</ul>
</div>
 
Alguien mas puede responder?
 
Atrás
Arriba