Ejemplo n.º 1
0
        <header>
          <h3><a href="<?php 
        echo $link;
        ?>
" title="<?php 
        echo $title;
        ?>
"><?php 
        echo $title;
        ?>
</a></h3>
        </header>
      </article>
    <?php 
    }
    ?>

    <?php 
    foreach ($articles as $index => $article) {
        $klass = thumb_class($index + 1);
        if (isset($filters) && !empty($filters)) {
            $klass2 = get_article_class($filters, $article);
            $klass .= ' ' . implode(' ', $klass2);
        }
        include '_article.php';
    }
    ?>
  </section>

<?php 
}
Ejemplo n.º 2
0
function get_similar_posts($post, $main_category, $dimension)
{
    $filters = get_post_filters($main_category);
    $posts = get_posts_from_category($main_category, -1);
    $ret = array();
    foreach ($posts as $p) {
        $klass = get_article_class($filters, $p);
        $klass = implode(' / ', $klass);
        if ($klass == $dimension && $p->ID != $post->ID) {
            $ret[] = $p;
        }
    }
    return $ret;
}