Ver Mensaje Individual
  #1 (permalink)  
Antiguo 21/10/2009, 10:18
elcolodeguillon
 
Fecha de Ingreso: mayo-2008
Mensajes: 5
Antigüedad: 16 años
Puntos: 0
De acuerdo Limitar los resultados en mi Home Wordpress

EN mi Index de wordpress se puede ver una Noticia principal como destacado y abajo las restantes.

lo que yo quiero es q en la aprte de abajo solo me aparezcan 4 noticias mas y e resto sea archivo, mirando el codigo de wirdpress no lo consigo.

Osea el FEATURED es la destacada y donde dice Mas noticias aparecen el resto.

ESTE ES EL CIDGO DE MI INDEX.PHP

Código:
<?php get_header(); ?>

<?php if (is_home() && !is_paged()) {

$sticky=get_option('sticky_posts');

$the_query = new WP_Query('showposts=1&p=' . $sticky[0]);

if ($the_query->have_posts()) :

  while ($the_query->have_posts()) : $the_query->the_post();

  $do_not_duplicate = $post->ID;

?>

	<!-- featured -->		

	<div id="featured">			

	

		<div id="featured-block" class="clear">

			

			<div id="featured-ribbon"></div>

			

			<div class="image-block">

              <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><img src="<?php if(get_post_meta($post->ID, "image_value", $single = true) != "") { echo get_post_meta($post->ID, "image_value", $single = true); } else { ?><?php bloginfo('template_url'); ?>/images/img-featured.jpg<?php } ?>" alt="featured" width="350px" height="250px"/></a>

         </div>			

			

			<div class="text-block">

			

				<h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>

			

				<p class="post-info">Publicado por <?php the_author(); ?> | en la categoria <?php the_category(', ') ?></p>

				

				<?php the_excerpt(); ?>

			

				<p><a href="<?php the_permalink(); ?>" class="more-link">Leer Más >></a></p>				

								

			</div>				

		

		</div>		

	

	<!-- /featured -->

	</div>	

<?php endwhile; endif; } ?>

	

	<!-- content -->

	<div id="content-wrap" class="clear">

	

		<div id="content">		

			

			<!-- main -->

			<div id="main">	

					

				<h3>Más Noticias >></h3>
		
<?php

$c = 0;

if (have_posts()) : while (have_posts()) : the_post(); 

if   ( $post->ID == $do_not_duplicate ) { continue; update_post_caches($posts); }

$c++;

?>
				

				<div class="block<?php echo $myclass; ?>">

				

					<?php if(get_post_meta($post->ID, "pimage_value", $single = true) != "") { ?><img src="<?php echo get_post_meta($post->ID, "pimage_value", $single = true); ?>" class="thumbnail" alt="img" width="240px" height="100px"/></a><?php } ?>

				

					<div class="blk-top">

					

						<h4><a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h4>	

						<p><span class="datetime"><?php the_time('F j, Y'); ?></span><a href="<?php comments_link(); ?>" class="comment"><?php comments_number(); ?></a></p>

						

					</div>						

					

					<div class="blk-content">

						

						<?php the_excerpt(); ?>			

								

						<p><a class="more" href="<?php the_permalink(); ?>">Leer Más&raquo;</a></p>

					

					</div>

				

				</div>

				

				<?php if(!($c % 2) == 1) { ?><div class="fix"></div><?php } ?>

<?php endwhile; endif; ?>		

			

			<!-- /main -->	

			</div>

		

<?php get_sidebar(); ?>

<?php get_footer(); ?>

Última edición por elcolodeguillon; 21/10/2009 a las 10:26