Ver Mensaje Individual
  #5 (permalink)  
Antiguo 08/04/2015, 20:03
Avatar de el_tigre
el_tigre
 
Fecha de Ingreso: febrero-2006
Ubicación: Perú
Mensajes: 1.044
Antigüedad: 18 años, 2 meses
Puntos: 8
Respuesta: visible por 7 días

Amigo "TMeister" probé tu código de varias formas sin un buen resultado...es decir, no me está funcionando, se supone que debería ser algo así:

Código PHP:
<?php
    $post_date 
strtotime$post->post_date );
    
$limit_time time() - ( DAY_IN_SECONDS );
?>
<?php 
if ($post_date $limit_time):?>
    <div class="div_fondito">
    <section class="suf-mag-excerpts suf-mag-excerpts-3">
 
        <!--sección vídeos -->
        <?php
            query_posts
('cat=35&showposts=6');
            while (
have_posts ()): the_post();
        
?>
 
            <li class="suf-mag-excerpt entry-content suf-tile-3c below">
                <div class="nuevo"></div>
                <?php if ($post_date $limit_time):?>
                    
                <?php endif ?>
 
                <div align="center" style="font-style:italic" class="div_bloque">
                    <?php if(function_exists('the_views')) { the_views(); } ?>
                </div>
 
                <div class="div_bloque">
                    <a href="<?php the_permalink() ?>">
                        <?php
                            
if ($thumb!='')
                                echo 
'<img width=90px height=120px;" src="'.$thumb.'" alt="'get_the_title().'" />';
                        
?>
                    </a>
                </div>
 
                <div class="div_bloque">
                    <a class="entry-title" href="<?php the_permalink(); ?>">
                        <?php the_title(); ?>
                    </a>
                </div>
            </li>
        <?php endwhile; ?>
    </section>
</div>
<?php endif ?>
 
<div class="div_fondito">
    <section class="suf-mag-excerpts suf-mag-excerpts-3">
 
        <!--sección vídeos -->
        <?php
            query_posts
('cat=35&showposts=6');
            while (
have_posts ()): the_post();
            global 
$post;
            
$thumb vp_get_thumb_url($post->post_content);
            
/**
             * GET THE POST TIME & TIME - 7 DAYS
             */
            
$post_date strtotime$post->post_date );
            
$limit_time time() - ( DAY_IN_SECONDS );
        
?>
 
            <li class="suf-mag-excerpt entry-content suf-tile-3c below">
                <div class="nuevo"></div>
                <?php if ($post_date $limit_time):?>
                    
                <?php endif ?>
 
                <div align="center" style="font-style:italic" class="div_bloque">
                    <?php if(function_exists('the_views')) { the_views(); } ?>
                </div>
 
                <div class="div_bloque">
                    <a href="<?php the_permalink() ?>">
                        <?php
                            
if ($thumb!='')
                                echo 
'<img width=90px height=120px;" src="'.$thumb.'" alt="'get_the_title().'" />';
                        
?>
                    </a>
                </div>
 
                <div class="div_bloque">
                    <a class="entry-title" href="<?php the_permalink(); ?>">
                        <?php the_title(); ?>
                    </a>
                </div>
            </li>
        <?php endwhile; ?>
    </section>
</div>
Se supone que la lógica va así:

Código PHP:
<?php
    $post_date 
strtotime$post->post_date );
    
$limit_time time() - ( DAY_IN_SECONDS );
?>
<?php 
if ($post_date $limit_time):?>
   <div class="div_fondito">
   ....mi código sin la etiqueta NEW
   </div>
 
<div class="div_fondito">
    ....mi código con la etiqueta NEW
</div>
¿es correcto?