关注最新活动资讯
实时分享免费福利

loop-video.php

<?php
/**
  * @name 视频分类页面模板
  * @author 蝈蝈要安静 | 一个不学无术的伪程序员
  * @copyright http://www.fulidada.com/
  * @version 1.0.0
  */
?>
<div class="cat-video-main">
    <?php 
    if ( have_posts() ): 
        echo '<div class="cat-video-content">';
            while ( have_posts() ) : the_post();
                echo '<article class="cat-video-item">';
                    echo '<a target="_blank"  href="'.get_permalink().'">'.get_the_post_thumbnail().'</a>';							
                    echo '<h2><a target="_blank" href="'.get_permalink().'">'.get_the_title().'</a></h2>';
                    echo '<div>';
	
                    echo '<span><a target="_blank" href="'.get_permalink().'"><i class="fa fa-eye" aria-hidden="true"></i>  ('.(int) get_post_meta($post->ID, 'views', true).')</a></span>';
                    echo '<span><a href="'.get_comments_link().'"><i class="fa fa-comments-o"></i> ('.get_comments_number('0', '1', '%').')</a></span>';
							
                    echo '<span class="cat-video-author"><a  href="'.get_author_posts_url( get_the_author_meta( 'ID' ) ).'"><i class="fa fa-user-circle" aria-hidden="true"></i> '.get_the_author_meta( 'nickname' ).'</a></span>';
							
                    echo '</div>';
                echo '</article>';
            endwhile; 
            wp_reset_query();
        echo '</div>';
        _moloader('mo_paging');
    else:
        get_template_part( 'content-404' );
    endif; 
    ?>
</div>