Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/05/2011, 16:43
Avatar de apoh07
apoh07
 
Fecha de Ingreso: mayo-2011
Mensajes: 31
Antigüedad: 13 años
Puntos: 2
Respuesta: ¿Cómo poner 3 loops en mi página principal usando el theme Chip Life y Wor

Cita:
Iniciado por metacortex Ver Mensaje
No conozco ese theme pero aquí tienes el tuto: [url]http://www.forosdelweb.com/f118/mini-tutorial-usar-varios-loops-para-construir-index-complejo-911440/[/url]
Gracias, pero en realidad ya descubrí que estaba equivocado.

Verán, el index.php sólo llama a otro archivo llamado "post-loop.php" que tiene este código:

Código:
<?php
/*
|--------------------------
| POST Validation
|--------------------------
*/

if ( ! have_posts() ):
	
	locate_template( array( CHIP_LIFE_COMMON_FSROOT . 'post-notfound.php' ), true, false );

else:

	/*
	|--------------------------
	| POST Style Decision
	|--------------------------
	*/
	
	global $chip_life_global;
	
	if( $chip_life_global['theme_options']['chip_life_post_style'] == "excerpt" ):
		locate_template( array( CHIP_LIFE_COMMON_FSROOT . 'post-excerpt.php' ), true, false );
	else:
		locate_template( array( CHIP_LIFE_COMMON_FSROOT . 'post-content.php' ), true, false );
	endif;

endif;




?>
Y este a su vez llama a otro archivo llamado "post-content.php" y es ahí donde está todo el códigp del loop, desde el diseño (que lo quiero conservar) hasta la programación (que es lo que hay que modificar, creo). Este es el código que tiene:

Código:
<?php
/*
|--------------------------
| Begin POST Loop
|--------------------------
*/

while (have_posts()) : the_post();

?>

<div class="chipboxm1 chipstyle3 <?php echo rtrim($post_class," "); ?>">
  <div class="chipboxm1data">
    <h2 class="blue margin0 font22"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2>
  </div>
</div>

<div class="chipboxm1 chipstyle1 margin10b">
  <div class="chipboxm1data">
    
    <div class="chipoverride1"><?php the_content(); ?></div>
    <?php
    $wp_link_pages = wp_link_pages( array( 'echo' => 0 ) );
	if( !empty($wp_link_pages) ):
	?>
    <div class="wplinkpages"><?php echo $wp_link_pages; ?></div>    
    <?php endif; ?>
  
  </div>
</div>

<div class="chipboxm1 chipstyle3 margin10b">
  <div class="chipboxm1data">
    
    <?php comments_template(); ?>
      
  </div>
</div>

<?php endwhile; ?>