Post::status('published'), 'content_type' => 'ad', 'limit' => 1, 'tag' => array(), ); $block->posts = array(); if(isset($theme->post)) { foreach($theme->post->tags as $tag) { $criteria['tag'][] = $tag; } if(count($theme->post->tags) > 0) { $block->posts = Posts::get($criteria); } } $block->criteria = $criteria; } ?>