예제 #1
0
/**
 * [mo_minicat description]
 * @return html [description]
 */
function mo_minicat()
{
    if (!_hui('minicat')) {
        return;
    }
    $args = array('ignore_sticky_posts' => 1, 'showposts' => 1, 'cat' => _hui('minicat'));
    query_posts($args);
    while (have_posts()) {
        the_post();
        $category = get_the_category();
        echo '<article class="excerpt-minic excerpt-minic-index">';
        echo '<h2><a' . _post_target_blank() . ' class="red" href="' . get_category_link($category[0]->term_id) . '">【' . (_hui('minicat_home_title') ? _hui('minicat_home_title') : '今日观点') . '】</a> <a href="' . get_permalink() . '" title="' . get_the_title() . _get_delimiter() . get_bloginfo('name') . '">' . get_the_title() . '</a></h2>';
        echo '<p class="note">' . _get_excerpt() . '</p>';
        echo '</article>';
    }
    wp_reset_query();
}
예제 #2
0
파일: excerpt.php 프로젝트: yszar/linuxwp
$p_meta = _hui('post_plugin');
while (have_posts()) {
    the_post();
    $ii++;
    echo '<article class="excerpt excerpt-' . $ii . (_hui('list_type') == 'text' ? ' excerpt-text' : '') . '">';
    if (_hui('list_type') !== 'text') {
        echo '<a' . _post_target_blank() . ' class="focus" href="' . get_permalink() . '">' . _get_post_thumbnail() . '</a>';
    }
    echo '<header>';
    if ($p_meta && $p_meta['cat'] && !is_category()) {
        $category = get_the_category();
        if ($category[0]) {
            echo '<a class="cat" href="' . get_category_link($category[0]->term_id) . '">' . $category[0]->cat_name . '<i></i></a> ';
        }
    }
    echo '<h2><a' . _post_target_blank() . ' href="' . get_permalink() . '" title="' . get_the_title() . _get_delimiter() . get_bloginfo('name') . '">' . get_the_title() . '</a></h2>';
    echo '</header>';
    echo '<p class="meta">';
    if ($p_meta && $p_meta['date']) {
        echo '<time><i class="fa fa-clock-o"></i>' . get_the_time('Y-m-d') . '</time>';
    }
    if ($p_meta && $p_meta['author']) {
        $author = get_the_author();
        if (_hui('author_link')) {
            $author = '<a href="' . get_author_posts_url(get_the_author_meta('ID')) . '">' . $author . '</a>';
        }
        echo '<span class="author"><i class="fa fa-user"></i>' . $author . '</span>';
    }
    if ($p_meta && $p_meta['view']) {
        echo '<span class="pv"><i class="fa fa-eye"></i>' . _get_post_views() . '</span>';
    }
예제 #3
0
파일: fn.php 프로젝트: yszar/linuxwp
function _the_logo()
{
    $tag = is_home() ? 'h1' : 'div';
    echo '<' . $tag . ' class="logo"><a href="' . get_bloginfo('url') . '" title="' . get_bloginfo('name') . _get_delimiter() . get_bloginfo('description') . '"><img src="' . _hui('logo_src') . '">' . get_bloginfo('name') . '</a></' . $tag . '>';
}