用于运行选定类别的“正在观看”视频的PHP代码

时间:2019-03-22 16:27:37

标签: php wordpress

在此代码中,视频随机显示。我想将它们显示为选定的类别(即e-'links'类别)。如何编写此代码以用于链接类别?

<?php if( !defined('ABSPATH') ) exit; global $awpt; ?> 

<div class="being_watched">
  <div class="heading">
    <?php $h_tag = $awpt['live_videos_heading']; $title = $awpt['beingwatched_title'];
      echo '<'.$h_tag.'>'.$title.'</'.$h_tag.'>' ?>
  </div>
  <div class="row">
    <div class="col-md-12">
      <ul class="Thumbnail_List">
        <?php
          $per_page = $awpt['watched_now_videos'];
          query_posts('showposts='.$per_page.'&orderby=rand');
          if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
        <?php do_action( 'bestia_thumbnail_compatibility' ); ?>
        <?php endwhile; else: endif; ?>
    </div>
  </div>
  <?php wp_reset_query(); ?>
  </ul>
</div>

0 个答案:

没有答案