output_timescales

Documentation/output_timescales

 

Description

Displays or returns the timescale of the news article. This tag may only be used within The Loop,

If this timescale has already been output, e.g ‘new in last 5 minutes’, then there will be no output.

For instance, you may have 10 news articles that were posted within the last 5 minutes, but you’ll only want this timescale to output once, at the top of these articles, as opposed to being output for every news article.

 

Usage

<?php if (function_exists('output_timescales')) output_timescales() ?>

 

Parameters

No parameters are accepted.

 

Examples

Get news and output the title of each article, with timescales

 

<?php
if (function_exists('get_news')) $loop = get_news($type, $days_ago, $posts_per_page);
/* Start the Loop */ while ( $loop->have_posts() ) : $loop->the_post();
     <?php if (function_exists('output_timescales')) output_timescales() ?>
     echo $post->post_title; endwhile;

?>
Web Statistics