weblan Posted October 26, 2010 Report Share Posted October 26, 2010 (edited) 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. <?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> Agrego imagen de lo que se requiere. Ver imagen aqui Porfa agradecería su ayuda Edited October 28, 2010 by weblan Link to comment Share on other sites More sharing options...
methoz Posted October 26, 2010 Report Share Posted October 26, 2010 sumale 1 Link to comment Share on other sites More sharing options...
weblan Posted October 27, 2010 Author Report Share Posted October 27, 2010 sumale 1 Podrías ser mas especifico porfa estoy iniciando el tema de PHP :) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now