PHP - Ayuda PHP

 
Vista:

Ayuda PHP

Publicado por Danilo Contreras (1 intervención) el 28/10/2010 04:54:01
Bueno maestros del WEB, quiero que me peguen una ayudita con un theme de wordpress. el punto que con el siguiente codigo yo muestro las ultimas 3 noticias + su foto en el home de mi sitio el punto es que quiero que al mostrar estas tres noticias, automaticamente omita la 1 y despliegue desde la 2 en adelante.

http://twitpic.com/31gtnu/full <<imagen de lo que se requiere hacer

Codigo de la columna derecha.

<?php



$cp_categories = get_categories('hide_empty=1');
$ar_featured = get_settings( "ar_featured" );
if( $ar_featured == 0 ) { $ar_featured = $cp_categories[0]->cat_ID; }
$num = get_settings( "cp_numFeatured" );
if( $num == 0 ) { $num = 3; }
query_posts( 'showposts=' . $num . '&cat=' . $ar_featured );

?>

<div class="label"><a href="<?php echo get_category_link($ar_featured);?>"><?php single_cat_title(); ?> »</a></div>

<?php while (have_posts()) : the_post(); ?>
<div class="clearfloat">

<?php $status = get_settings ( "cp_thumbAuto" );
if ( $status != "first" ) { ?>

<?php $values = get_post_custom_values("Image");
if (isset($values[0])) { ?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Continuar Leyendo <?php the_title(); ?>.">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php echo get_option('home'); ?>/<?php
$values = get_post_custom_values("Image"); echo $values[0]; ?>&w=100&h=65&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="100px" height="65px" /></a><?php } ?>

<?php } else { ?>

<?php $id =$post->ID;
$the_content =$wpdb->get_var("SELECT post_content FROM $wpdb->posts WHERE ID = $id");
$pattern = '!<img.*?src="(.*?)"!';
preg_match_all($pattern, $the_content, $matches);
$image_src = $matches['1'][0]; ?>

<a href="<?php the_permalink() ?>" rel="bookmark" title="Continuar Leyendo <?php the_title(); ?>.">
<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=<?php if($image_src != '') { echo $image_src; } ?>&w=100&h=65&zc=1&q=100"
alt="<?php the_title(); ?>" class="left" width="100px" height="65px" /></a>

<?php } ?>

<div class="info"><a href="<?php the_permalink() ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
<div class="meta"><?php the_time('D, j/m/y') ?> – <?php the_time('G:i') ?> | <?php comments_popup_link('Comentar', '1 Comentario', '% Comentarios');?></div>

</div>

</div>

<?php endwhile; ?>

<?php wp_reset_query(); ?>

</div>

</div>
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder