• i am building a News site. I want to display 1 featured post from “prime” category for only few hours. after it should be expired or disappeared from the section.

    please have a look here u can see the post on top.

    <div id="prime_news" class="col-full">
     <?php $the_query = new WP_Query('category_name=prime&showposts=1&orderby=post_date&order=desc');
        if ($the_query->have_posts()) :?>
    <div id="prime_headline">
    <?php while ($the_query->have_posts()) : $the_query->the_post(); ?>
    <?php endwhile; ?>
    <div class="prime_left fl">
    <h3><a href="<?php the_permalink(); ?>" title="" class="title_slide"><?php the_title(); ?></a></h3>
    <p class="prime_excerpt"><?php echo limit_words(get_the_excerpt(), '190'); ?><span  class="read-more"><a href="<?php the_permalink(); ?>"><?php _e('???  ???...', 'BharatNews'); ?></a></span></p></div>
    <div class="prime_right fr"><?php bharti_get_image('image',560,320,' '.$GLOBALS['align']); ?></div>
    </div><div class="clear"></div>
        <?php endif; ?>
    
     </div>
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘hide div Content after a certain time ?’ is closed to new replies.