get( 'layout', 'related' )) { ?>
_( 'relatedposts' )?>:
ID;
$showed_posts=array();
$tags=get_the_tags($postid);
$categories = get_the_category($postid);
$post_cnt=0;
$first=0;
if ($tags) {
$tags_ids = array();
foreach($tags as $tag) $tags_ids[] = $tag->term_id;
$args=array(
'tag__in' => $tags_ids,
'post__not_in' => array($postid),
'showposts'=>$SMTheme->get( 'layout', 'relatedcnt' ),
'caller_get_posts'=>1);
$posts=get_posts($args);
if( count($posts)>0 ) {
foreach ($posts as $p) {
$post_cnt++;
$showed_posts[]=$p->ID;
?>
- >get( 'layout', 'colors' )) {
$r=rand(1,150);
$g=rand(1,150);
$b=rand(1,150);
} else {
$r=$g=$b=1;
}
$first++;
if(has_post_thumbnail($p->ID)) {
?>ID,array(126,126), array('title'=>$p->post_title, 'alt'=>$p->post_title));
?>
post_title ?>
get( 'layout', 'relatedcnt' ))) {
$category_ids = array();
foreach($categories as $individual_category) $category_ids[] = $individual_category->term_id;
$showed_posts[]=$postid;
$args=array(
'category__in' => $category_ids,
'post__not_in' => $showed_posts,
'showposts'=>$SMTheme->get( 'layout', 'relatedcnt' )-$post_cnt,
'caller_get_posts'=>1);
$posts=get_posts($args);
if( count($posts)>0 ) {
foreach ($posts as $p) {
$ttl=iconv_substr( $p->post_title, 0, 150, 'utf-8' );
?>
- >get( 'layout', 'colors' )) {
$r=rand(1,150);
$g=rand(1,150);
$b=rand(1,150);
} else {
$r=$g=$b=1;
}
$first++;
if(has_post_thumbnail($p->ID)) {
?>ID,array(126,126), array('title'=>$p->post_title, 'alt'=>$p->post_title));
?>
post_title ?>
_( 'norelatedposts' )?>