• Hola a todos,

    Ante todo gracias por simplemente entrar en este mensaje y tomaros un rato de vuestro tiempo para echarme una mano de manera desinteresada y sin conocerme. Verdaderamente es admirable esta comunidad.

    Os cuento. Estoy intentando modificar un theme para, cuando no haya una imagen featured definida, no muestre la que se contenga en: images/featured.png, ni ninguna otra.

    Esta es la parte que intento modificar:

    <div id="featured">
    
    	<img src="<?php bloginfo('template_url'); ?>/images/featured.png" width="72" height="17" alt="" />
    
    	<?php query_posts("showposts=4&category_name=Featured"); $i = 1; ?>
    
       	<?php while (have_posts()) : the_post();
    			$values = get_post_custom_values("Image");
    	?>
    
            <div class="clearfloat">
    
                 <?php if (has_post_thumbnail()) {
    				?>
    					 <a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    					 	<?php
    					 		the_post_thumbnail('featured',array('class'=>'featured-thumb-wrapper', 'title'=>$title));
    						?>
                    	</a>
    				<?php
    				} else
    				if (isset($values[0])){
    				?>
    					<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    					<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/<?php echo urlencode($values[0]); ?>&w=100&h=65&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="100" height="65"  /></a>
    				<?php
    				} else {
    				?>
                    	<a href="<?php the_permalink(); ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>">
    					<img src="<?php echo bloginfo('template_url'); ?>/scripts/timthumb.php?src=/images/no-image.png&w=100&h=65&zc=1&q=100" alt="<?php the_title(); ?>" class="left" width="100" height="65"  /></a>
                    <?php } ?>
    
    			<div class="info">
            		<a href="<?php the_permalink(); ?>" rel="bookmark" class="title"><?php the_title(); ?></a>
    				<div class="meta">[ <?php the_time('j M Y') ?> | <?php comments_popup_link('No Comment', 'One Comment', '% Comments');?> <?php if(function_exists('the_views')) { ?>|  <?php the_views(); } ?>]
                    </div>	
    
    			</div>
        	</div>
    
    	<?php endwhile; ?>
    
    	</div>
    
    </div>

    Si alguien tiene alguna idea de cómo hacerlo se lo agradecería.

    Un saludo,
    Iván.

  • El debate ‘Featured images’ está cerrado a nuevas respuestas.