Cómo excluir o no mostrar Último Post en Categoría con (query_posts)
-
Gente aquí les dejo mi interrogante y es la siguiente: ¿Cómo excluir o no mostrar el Último Post publicado en una Categoría con (query_posts)? ya que utilice un mismo bug de códigos y lo dupliqué 2s veces, ahora quiero que uno me muestre el último post publicado y el otro muestre el antepenúltimo post para que ninguno de los 2s muestre el mismo post. Utilicé la variante randon post pero siempre en algunos casos me va a mostrar el mismo post y es lo que no quiero. Por supuesto, más abajo les muestro los bug de códigos a los que me refiero, estos son con el Theme Arthemia:
<div id="headline" class="left"> <?php query_posts("showposts=1&category_name=Especiales"); ?> <?php while (have_posts()) : the_post(); ?> <h3 class="cat_title"> <?php the_category(', '); ?> »</h3> <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div> <div class="meta"><?php the_time('j M Y') ?> | <?php comments_popup_link('<div class="genericon genericon-chat"></div> +', '<div class="genericon genericon-chat"></div> 1', '<div class="genericon genericon-chat"></div> %');?></div> <?php $values = get_post_custom_values("Image");?> <a class="left" href="<?php the_permalink() ?>" rel="bookmark" title="Enlace a <?php the_title(); ?>"> <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=250&h=200&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="250px" height="200px" /></a> <?php the_excerpt(); ?> <a class="left" href="<?php the_permalink() ?>" rel="bookmark" title="Enlace a <?php the_title(); ?>">Leer más »</a> <?php endwhile; ?> </div> <div id="headline" class="right"> <?php query_posts("showposts=1&excludeposts=1&orderby=rand&category_name=Especiales"); ?> <?php while (have_posts()) : the_post(); ?> <h3 class="cat_title"> <?php the_category(', '); ?> »</h3> <div class="title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></div> <div class="meta"><?php the_time('j M Y') ?> | <?php comments_popup_link('<div class="genericon genericon-chat"></div> +', '<div class="genericon genericon-chat"></div> 1', '<div class="genericon genericon-chat"></div> %');?></div> <?php $values = get_post_custom_values("Image");?> <a class="left" href="<?php the_permalink() ?>" rel="bookmark" title="Enlace a <?php the_title(); ?>"> <img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php $values = get_post_custom_values("Image"); echo $values[0]; ?>&w=250&h=200&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="250px" height="200px" /></a> <?php the_excerpt(); ?> <a class="left" href="<?php the_permalink() ?>" rel="bookmark" title="Enlace a <?php the_title(); ?>">Leer más »</a> <?php endwhile; ?> </div>
Viendo 1 respuesta (de un total de 1)
Viendo 1 respuesta (de un total de 1)
- El debate ‘Cómo excluir o no mostrar Último Post en Categoría con (query_posts)’ está cerrado a nuevas respuestas.