News

// Original PHP code by Chirp Internet: www.chirp.com.au
// Please acknowledge use of this code by including this header.
// http://www.the-art-of-web.com/php/truncate/
function myTruncate($string, $limit, $break=”.”, $pad=”…”)
{
if(strlen($string) <= $limit) return $string;
if(false !== ($breakpoint = strpos($string, $break, $limit))) {
if($breakpoint < strlen($string) – 1) { $string = substr($string, 0, $breakpoint) . $pad; } } return $string; } ?>
$recentposts = wp_get_recent_posts($args, ‘ARRAY_A’);
$x = count($recentposts);
$i = 0;
foreach($recentposts as $recent ){
$i++; echo ‘‘ . $recent[“post_title”].’‘;
echo ”

“.myTruncate($recent[“post_content”], 100).”

“;
if ($i < $x) echo ”

“;
}
?>
View All

Connect
With Us

for product news and updates